Light of Day
Light of Day

Reputation: 27

how do i make a submit button link to another page

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

Upvotes: 0

Views: 22192

Answers (2)

Alexie01
Alexie01

Reputation: 141

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>

Upvotes: 0

Cookie Ninja
Cookie Ninja

Reputation: 1184

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.

Upvotes: 1

Related Questions