View Full Version : Difference betweeen name and value ?

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.

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

just test it...

mr e
06-05-2007, 01:48 AM