accessing with id
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: accessing with id

  1. #1
    Join Date
    Aug 2005
    Posts
    69

    accessing with id

    In a php file, I've a form like the following:
    Code:
    <form method="POST" action="test2.php">
    <p align="center">
    	<table border="1" frame="box" rules="none">
    	    <caption>Sign up</caption>
    	    <tr>
    		<td>User id<sup>*</sup></td><td><input type="text" id="userid" /></td>
    	    </tr>
    	</table>
        </p>
    </form>
    When the form data is submitted, I want to access the information inside the text field having id="userid". How can I do that? I'm a novice in PHP so please explain.
    ~Donotalo()

  2. #2
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    331

    Re: accessing with id

    You need to use the name attribute instead of id. Then you can access the value using
    PHP Code:
    $_POST["userid"
    .

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center