Maybe someone can shed some light on this.  I have a form to handle a file
upload, but through the same form I would like to gather data as well.  For
example, ID, Price & Picture.

Now I set up my form to handle the file upload, and that all works great,
but I can't seem to access the other variables.  Can I use for form to
collect data and files?

My code is as follows:

<File 1>

<form name="Update" enctype="multipart/form-data" action="Update2.php"
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
 <table border="0" cellpadding="0" cellspacing="0" width="100%">
   <td width="100%" colspan="4" nowrap>
    <table border="0" cellpadding="0" cellspacing="4" width="100%">
      <td width="205" rowspan="7" valign="middle">
       <b>Input Picture Here:</b><br>
        <INPUT TYPE="FILE" NAME="userfile" SIZE="35">
      <td width="*" valign="middle">
        <INPUT TYPE="TEXT" NAME="Price" SIZE="10">

<File #2>


//Update Listing   

$Price = $HTTP_POST_VARS['Price'];

if(!empty($HTTP_POST_FILES['userfile']['tmp_name'])) {
    $filename = $HTTP_POST_FILES['userfile']['tmp_name'];
    $newname = "/images/".$ID."_01.jpg";


Now whether I use the $Price alone or $HTTP_POST_VARS['Price'] I get



PHP General Mailing List (
To unsubscribe, visit:

Reply via email to