+ 2

How perform submit button

<html> <head> <title> Form </title> </head> <form action="first.php" method="GET" > First Name:<br><input type="text" name="firstname"><br> Last Name:<br><input type="text" name="lastname"><br> <h2>Gender</h2> <input type="radio" name="gender" value ="male"checked> Male<br> <input type="radio" name="gender" value ="female"checked> Female<br> <input type="radio" name="gender" value ="other"checked> Other<br> <input type="submit" value ="submit"> </form> </html>

13th Jan 2020, 8:51 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
11 Answers
+ 2
Where will you show this empty form to store another data? In "first.php"? But why you need to ask the questions in different forms? can't you put all the questions in the form on this page? FYI not everyone will be comfortable having to go through multiple pages to fill up form fields. Or did you mean you want to go back to this page after "first.php" has completed processing the form data?
13th Jan 2020, 9:39 AM
Ipang
+ 1
I don't understand your question, what did you mean by "perform submit button"? Can you add PHP in question tags? as it seems, your code is related to PHP because the form is sending the form data to a PHP file.
13th Jan 2020, 9:27 AM
Ipang
+ 1
When I click submit button.... This data will submit and then next I will want empty form to store another data... How do I perform this action.
13th Jan 2020, 9:30 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
+ 1
Maybe you need input type reset? <input type="reset" value="reset">
13th Jan 2020, 9:48 AM
AnnĐ”
AnnĐ” - avatar
+ 1
When we use reset data this will not be store data this just perform reset data....
13th Jan 2020, 9:53 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
+ 1
<html> <head> <title>first</title> </head> <body> <?php echo $_GET["firstname"];?> <br> <?php echo lastname $_GET["lastname"];?> <br> <?php echo gender $_GET["gender"];?> </body> </html> This my first.php code
13th Jan 2020, 10:37 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
+ 1
But it's not working... So want can I do....
13th Jan 2020, 10:38 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
+ 1
sorry....Actually both are not working.... I'm trying both.... So what can I do
13th Jan 2020, 10:47 AM
Priyanka Gotugade.
Priyanka Gotugade. - avatar
0
Priyanka Gotugade. You can redirect by using header function in PHP. You can redirect to another page once "first.php" is done processing the submitted form data. See some examples below https://www.w3schools.in/php/php-headers/
13th Jan 2020, 10:34 AM
Ipang
0
Priyanka Gotugade. You are making me confused. First you say you want to submit this form data and want user to fill up on empty form for additional data, I thought this was the problem. But now you tell me that your "first.php" is not working, how can I assist you this way?
13th Jan 2020, 10:43 AM
Ipang
0
Sumit Button send data when using server
15th Jan 2020, 7:15 AM
Ahmed Jama Hasan Mahamud
Ahmed Jama Hasan Mahamud - avatar