0

I need help on my site guys. I had the site all ready now but I can't make a submit button save and redirect to the submitted registration page, this is my whole code:

<h1> Welcome to the Registration Page <h1>
<form>
  First name:<br>
  <input type="text" name="First Name"><br>
    Middle name:<br>
  <input type="text" name="Middle Name"><br>
  Last name:<br>
  <input type="text" name="Last Name"><br>
  Gender: <br>
    <input type="radio" name="gender" value="male" checked> Male<br>
  <input type="radio" name="gender" value="female"> Female<br>
  <input type="radio" name="gender" value="other"> Other<br>
    Email Address:<br>
  <input type="text" name="Email Address"><br>
  Password:<br>
  <input type="text" name="Password"><BR>
    Confirm Password:<br>
  <input type="text" name="Password Confirmation"><br>
  Referral Account:<br>
  <input type="text" name="Referal">
   <input type="submit" value="Submit">
</form>

I don't know what to put in the code to make it save the records and redirect to another page

Serenity
  • 35,289
  • 20
  • 120
  • 115
Light of Day
  • 27
  • 1
  • 1
  • 2

2 Answers2

1

You probably need an action attribute with the the page you want to redirect.

<form method="POST" action="another_page.html"></form>

And there are many ways for submission of form and redirect. You might want to learn about PHP and/or Ajax.

Also, if you want to store records on the database for example, you should learn PHP for it and SQL queries for database interaction.

You can refer on this link.

Community
  • 1
  • 1
Cookie Ninja
  • 1,156
  • 15
  • 29
0

Or you can simply if you have php file:

<form method="POST" action="handler.php">

<input type="submit" value="Submit" onclick="window.location = 'another_page.html'">

</form>
Alexie01
  • 101
  • 1
  • 7