Jump to content

$_POST doesn't contain all my form elements


ricklee

Recommended Posts

Hi,

I was wondering why I can't get my form to work. 

 

<form id="order_1" action="process1.php" method="POST">
<table>
<tr><td>Email:			</td><td><input 	
			type="text" 
			name="email" 
			id="email" 
			value="" /></td></tr>

<tr><td>Name:			</td><td><input 	
			type="text" 
			name="name" 
			id="name" 
			value="" /></td></tr>

<tr><td>Address:		</td><td><textarea 
			name="address" 
			rows="4" 
			id="address"></textarea></td></tr>

<tr><td>Phone:			</td><td><input 	
			type="text" 
			name="phone" 
			id="phone" 
			value="" /></td></tr>

<tr><td>Additional comments:	</td><td><textarea 
			name="comments" 
			rows="5" 
			id="comments"></textarea></td></tr>

<tr><td></td><td><input class="submit" type="submit" value="Continue" /></td></tr>
</table>
</form>

 

When I fill in all the fields, submit the form and do var_dump on it, this is what I get:

array(3) {
  ["email"]=>
  string(23) "[email protected]"
  ["name"]=>
  string(12) "212-312-8982"
  ["comments"]=>
  string(38) "I have no additional comments to make."
}

 

As you can see, not only is it ignoring 2 fields, but the phone field is coming in as "name".  I went through the code over and over again to see what I could have typed wrong, and I tried different things, but I've finally run out of ideas.

 

If anyone can shed light on this, I would be very grateful.  Thank you.

 

Rick

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.