i cant see uploaded image name in mysql database table.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mansi49
    New Member
    • Sep 2013
    • 1

    i cant see uploaded image name in mysql database table.

    simply when i try this code in my php editor images was successfully uploaded in folder but not show image name in mysql database table.

    html file code:
    Code:
    <form  action="move_fupload.php" method="post" enctype="multipart/form-data">
    User File1<input type="file" name="ufile" />
    <input type="submit" />
    </form>

    php file code :
    Code:
    <?php
    $tmp_name=$_FILES["pimg"]["tmp_name"];
    $name=$_FILES["pimg"]["name"];
    
    move_uploaded_file($tmp_name,"http://example.com/images/".$name);
    ?>

    please suggest where i mak a mistake in this code.
    Last edited by Dormilich; Sep 2 '13, 05:38 AM. Reason: Please use code tags when posting code.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    your names don’t match. in the form you have ufile but in the script it’s pimg.

    Comment

    • selvasoft
      New Member
      • Mar 2010
      • 34

      #3
      Code:
      User File1<input type="file" name="ufile" />
      check the name of your file upload field. And use the correct name for the get temp_name.

      Comment

      Working...