Results 1 to 4 of 4

Thread: PHP ..Grrr

  1. #1
    Well this is driving me up the WALL .. lol. Ive been at this for dayz and its just annoying me. What I am trying is to make a PHP script that will upload a users files from a HTML form into a folder on my webserver. Im not a total n00b at PHP far from it just this is the first time Ive tried something like this , did my research and fell flat on my face.
    The final product of this project would be that logged on users (I have made a working Auth system) can upload a image it is recorded in a MySQL table of their name so they can review past uploads and possibly delet.
    But anyway I am having problems with the first bit lol. I am good with PHP and MySQL but man this is doin the old nogin in lol. Any help is highly appreciated and if any value Gmail invites avail lol.

    Thanks again J0H4N

    Bare bones of Old script which will do nothing when I run it:

    HTML Form:

    <FORM ENCTYPE="multipart/form-data" ACTION="form.php" METHOD=POST>
    Upload this file: <INPUT NAME="userfile" TYPE="file">
    <INPUT TYPE="submit" VALUE="Send File"></FORM>

    PHP File:
    <?
    if ($userfile_size >250000){$msg=$msg."Your uploaded file size is more than 250KB so please reduce the file size and then upload. Visit the help page to know how to reduce the file size.<BR>";
    $file_upload="false";}

    if (!($userfile_type =="image/pjpeg" OR $userfile_type=="image/gif")){$msg=$msg."Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>";
    $file_upload="false";}
    $add="screens/$userfile_name";

    ?>
    ~-~J~0~H~4~N~-~

  2. Internet, Programming and Graphics   -   #2
    Poster
    Join Date
    Jan 2003
    Location
    Belle Vernon, PA, USA
    Posts
    638
    Exactly what part of the upload fails?

    (Google Search: php upload files)

  3. Internet, Programming and Graphics   -   #3
    Thanks for the reply. I already googled about alot not really helped though. There is no error when i run the script rather it dont do nothing when i send the file to the form. It returns a blank page which it should do but the file is never uploaded. I have given the file and forlder 777 for the sake of test and that didnt help either.
    Thanks again,
    J0H4N
    ~-~J~0~H~4~N~-~

  4. Internet, Programming and Graphics   -   #4
    Ok thanks again for the help , but finaly solved. It was detected as an file hijack attack on my server so just sorted that out and now works. God bless security of Redhat lol.

    Thanks again
    ~-~J~0~H~4~N~-~

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •