+ 1
how to take input from User in PHP ?
8 Antworten
+ 5
in HTML
<input type="text" name="user" >
in PHP
if (isset ($_POST['user'])){
Do this if I sset the user name
}
else {
Do this if I didn't set the user name
}
+ 4
$_GET used to retrieve what icluded in the browser link.
example
www.sololoearn.com/user.php?name=sushant
the PHP will look for the name in the link and will print the name as sushant
+ 2
Create a HTML form and read the input with $_POST or $_GET
+ 1
<?php
if(!empty($_POST['input_data']) && isset($_POST['input_data'])){
$variable = $_POST['input_data'];
?>
0
thanks
0
how it will work ...in the case of taking values from User and putting it in an Array simultaneously ?
0
Do you mean inserting the values to database with php ?
0
i mean to ask the user to enter some thing eg his name, age as its done in java with scanner....