Link to home
Start Free TrialLog in
Avatar of carsRST
carsRSTFlag for United States of America

asked on

PHP Upload and $_POST

I have a form upload which works fine.  However, my hidden variables don't seem to make it, and I'm not sure exactly why.  Below is my form and part of the PHP code:

 
<form action="upload.php" method="post" id="form" enctype="multipart/form-data">	
	<input name="file" id="file2" type="file"/>

	<input type="submit" id="upload" value="Upload" />
	<input type="hidden" id="username" value="<?echo($user->firstname) . " " . $user->lastname;?>" />
	<input type ="hidden" ID="ID" value="<? echo($new_order_initiation_ID);?>">
	<input type ="hidden" ID="date_fld" value="cube_date">
	<input type ="hidden" ID="per_fld" value="cube_by">
</form>


//##PHP FILE##

$date_fld = $_POST['date_fld'];  
$per_fld = $_POST['per_fld'];
$ID= $_POST['ID'];

Open in new window

Avatar of carsRST
carsRST
Flag of United States of America image

ASKER

BTW - the data in my hidden fields comes through fine in the HTML.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, save yourself some trouble going forward... Add error_reporting(E_ALL) to the top of all your scripts.  If you had that here you would have gotten a Notice message about the undefined index in $_POST.

Best regards, ~Ray
Avatar of carsRST

ASKER

Thx...ill try soon