0

How to get values using post n php

method = post

9th Nov 2016, 9:10 PM
Sanchit Srivastava
2 Answers
+ 2
If you simply want to retrieve data from a POSTed form, you can use the PHP Superglobal $_POST, which is an associative array containing all of the data posted. Keep track of your input elements name attributes in your form. Also your forms method must be post. Say we have <input type="text" name="username"> .. once we post the form, we can access this value through the $_POST superglobal For example: $_POST["username"] Hope this helps.
9th Nov 2016, 10:03 PM
James Welch
James Welch - avatar
+ 1
They are stored in the $_POST array. If you want the value for your username field, by example, it will be $_POST["username"]
9th Nov 2016, 10:02 PM
Pierre Varlez
Pierre Varlez - avatar