+ 1
How to get user input in PHP, and store it's value in a variable?
2 ответов
+ 2
you should creat an input field in form html and get the value from the $_get or $_post array. like this
https://code.sololearn.com/w51NO7XRDTA5/?ref=app
+ 1
create an input field of the type you want for example:
<input type="text" name="xyz" >
create the submit button:
<input type="submit" name="sub" value="Submit">
now for storing user input in a variable:
if(isset($_POST['sub']))
{
$userinput=$_POST['xyz'];
}