keffodan Posted October 15, 2012 Posted October 15, 2012 Could someone please explain to me what this will php code will actually do with a brief description of each value/attribute? Is it essentially creating a form with a place to enter a name and a choice of choosing module 1 or module 2? What do the method = post and action = link do exactly? Any help appreciated. <form id ="test" name = "test" method = "post" action = "http://www.ipa.ie/test.php"> </form> <label for = "name">Enter name</label> <input type = "text" name = "name"id = "name"/> <label> <input type -"radio" name = "modules" value = "1" id = "modules_0"/> web</label> </br> <label> <input type = "radio"name = "modules" value = "2" id = "modules_1"/> hardware</label>
Cap'n Refsmmat Posted October 15, 2012 Posted October 15, 2012 That's not PHP code; it's HTML. method="post" describes how the information in the form will be sent to the server. You can see details here: https://en.wikipedia.org/wiki/POST_%28HTTP%29 action="" tells the browser where to submit the form contents. When you press the submit button, the browser makes an HTTP request to the link provided in action= containing the form data.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now