Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    85
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Difference betweeen name and value ?

    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.
    I am on my way. :)

  • #2
    Banned
    Join Date
    Apr 2007
    Posts
    428
    Thanks
    29
    Thanked 5 Times in 5 Posts
    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...

  • #3
    Regular Coder
    Join Date
    Apr 2007
    Posts
    295
    Thanks
    0
    Thanked 19 Times in 19 Posts
    It's

    $_POST['NAME_OF_FORM_ELEMENT'] = VALUE_OF_FORM_ELEMENT


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •