Jump to content

[SOLVED] File Upload Issue


tejama

Recommended Posts

Okay guys, I read the PHP manual on file uploading, wrote the following script and I'm having no luck.

-----------------------------------------------

 

  <form action='enter_item.php' method='post'>

    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />

  <p><table width='40%' border='0' cellpadding='1' cellspacing='1'>

    <tr>

      <td><b>Headline</b>:</td>

      <td><input type='text' name='headline'></td>

    </tr>

    <tr>

      <td valign='top'><b>Description</b>:</td>

      <td><textarea name='description' cols='50' rows='10'></textarea></td>

    </tr>

    <tr>

      <td><b>Price</b>:</td>

      <td><input type='text' name='price' size='7'></td>

    </tr>

    <tr>

      <td>Pic 1:</td>

      <td><input type='file' name='up1'></td>

    </tr>

    <tr>

      <td><input type='submit' value='Submit'></td>

      <td>&nbsp</td>

    </tr>

  </table>

  </form>

 

-----------------------------------------------

enter_item.php

 

  echo "Name: " . $_FILES['up1']['name'];

 

-----------------------------------------------

 

This is just display "Name:" and nothing else.  Can anyone point out what I'm doing wrong here?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/40285-solved-file-upload-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.