...

View Full Version : Difference betweeen name and value ?



inVINCEable
06-05-2007, 01:06 AM
I am creating an html form that looks like this


<input type="text" name="city" value="here"/>


When accessing this in php, the value is what I want correct? If I am accessing this through the post method, I would use $_POST['here'] correct?


If I am wrong, please offer me a little guidance. I always get the name/value mixed up because on submit buttons they are different too.


Thank you.

matak
06-05-2007, 01:10 AM
you'r accessing it with name not with value..
from your example it would be
$_POST['city']
value is the default text that will be shown on your input.

just test it...

mr e
06-05-2007, 01:48 AM
It's

$_POST['NAME_OF_FORM_ELEMENT'] = VALUE_OF_FORM_ELEMENT



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum