+ 1

Hey i make html form if user submit the form how i can i see their input

how to get their inputs after when they submitted the form

30th Sep 2017, 5:09 AM
Ronit
5 Réponses
+ 5
To add to @Kartikey, if your form uses POST method: <?php print_r($_POST); ?> And if your form uses GET method: <?php print_r($_GET); ?> The print_r function will display all that were sent when the form data is submitted. Hth, cmiiw
30th Sep 2017, 8:47 AM
Ipang
+ 4
Use PHP to store their input in a file or PHP with MySQL to store it in database
30th Sep 2017, 5:29 AM
Kartikey Sahu
Kartikey Sahu - avatar
+ 4
<!DOCTYPE HTML> <html>   <body> <form action="welcome.php"method="get"> Name: <input type="text"name="name"><br> E-mail: <input type="text"name="email"><br> <input type="submit"> </form> </body> </html> welcome.php <html> <body> Welcome <?php echo $_GET["name"]; ?><br> Your email address is: <?php echo $_GET["email"]; ?> </body> </html>
30th Sep 2017, 8:47 AM
Kartikey Sahu
Kartikey Sahu - avatar
+ 4
And to save <?php $email = $_GET['email']; $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); fwrite($myfile, $email); $email is what you'll save fclose($myfile); ?>
30th Sep 2017, 8:51 AM
Kartikey Sahu
Kartikey Sahu - avatar
+ 1
give example if you have
30th Sep 2017, 6:26 AM
Ronit