+ 4

How can you receive the form details of a user using php???

Please i need help on my webpage

24th Jun 2018, 6:47 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
11 ответов
+ 3
Suppose you have a form on mypage.php: <form action ="receive.php" method="post"> <input type="text" name="name" /> <input type="email" name="useremail" /> <input type="submit" name="submit" value="Submit a form" /> </form> Having submitted this form (after pressing the button 'Submit a form') you can receive user's data on receive.php page with the help of the following code (on receive.php): <?php if(isset($_POST['submit'])){ $name = $_POST['name']; $email = $_POST['useremail']; } ?>
26th Jun 2018, 7:25 AM
Ihar Petrushenka
Ihar Petrushenka - avatar
+ 4
yes you can by using $_get[] or $_post[] https://www.sololearn.com/learn/PHP/1841/
24th Jun 2018, 6:50 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
<input type = "email" name="email" /> <input type = "text" name="name" /> <?php echo "Your Name is". $_GET['name'] ; echo "Your email is". $_GET['email'] ; ? >
25th Jun 2018, 2:49 AM
Femi
Femi - avatar
+ 1
Where on earth will i type it and where will i submit it Please help me!!!
24th Jun 2018, 6:52 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
0
ihar petrushenka where will i type the php get, post code
26th Jun 2018, 6:26 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
0
The form's attribute 'action' shows where user's data is submitted. In the example above the data is submitted to receive.php page. So the receive.php page should contain $_POST (or $_GET).
26th Jun 2018, 7:36 PM
Ihar Petrushenka
Ihar Petrushenka - avatar
0
then what attribute links mu form to the next page on the website
26th Jun 2018, 7:49 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
0
As in the next page where after the form is submitted???
26th Jun 2018, 7:51 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
0
And also where will i type the code: <?php $name = $_POST['name']; $name=$_POST['useremail']; ?>
26th Jun 2018, 7:54 PM
Chiemezie Njoku
Chiemezie Njoku - avatar
0
You should enter the code on the page which name is the value of the attribute action. If, for example, action="newpage.php" then you should enter the mentioned above code on the page newpage.php. newpage.php will collect and process the data, entered by user.
26th Jun 2018, 9:26 PM
Ihar Petrushenka
Ihar Petrushenka - avatar
0
can someone explain to me how to create Facebook login page and after person try to login my page I will get the email and password
25th Aug 2018, 3:31 PM
Cubek