Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8542963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:11:32+00:00 2026-06-11T12:11:32+00:00

I have a 3 page registration site. When the user selects one of three

  • 0

I have a 3 page registration site. When the user selects one of three options on the first page they can submit and move onto the 2nd page. There they fill out information and click submit which should take them to the third page. The problem is the jquery redirect code after clicking submit on the 1st and 2nd page is NOT working. This is the code in the first page:

<?php
session_start();
$errors = false;
$message="";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!isset($_POST['Reg_type']) || !preg_match('/^[123]$/', $_POST['Reg_type'])) {
        $message = "Please select an option";
        $errors = true;
    }
    if (!$errors) {
        $_SESSION["regtype"]=$_POST["Reg_type"];
        header("Location: Registration_2.php");
        exit;
    }
}
?>
<div id="form_page1">
<form id="frmtype1" name="frmtype1" method="post">
<input type="radio" name="Reg_type" value="1"/> option1 <br/>
<input type="radio" name="Reg_type" value="2"/> option2 <br/>
<input type="radio" name="Reg_type" value="3"/> option3 <br/>
<input type="submit" name="Submit" value="Submit" />
<?php
if($errors)
echo $message;
?>

I’m trying to convert that php code into javascript and this is what I have:

<script>
$(document).ready(function(e) {
    $("form").submit(function() {
        var data= $(this).serialize();
        alert(data);
        $.post("/Registration_1.php",$("#form_page1").serialize());
            window.location.replace("http://www.google.com"); //just for testing purposes
    });
});
</script>

But for some reason the jquery stuff just WON’T work, so i have to use the php instead. Can anyone tell me what the problem is? Does the first argument of the post method have to be the page you want to go to (Registration_2.php) or the page you are asking data from? Hopefully if the first page’s jquery code is fixed it can fix the 2nd page. I’ve been working/researching this problem for the past 3 hours to no avail. Please help, thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:11:33+00:00Added an answer on June 11, 2026 at 12:11 pm

    Why choose such a complicated solution?

    Form 1:

    <form action="form2.php"  method="post">
      <input type="submit" >
    </form>
    

    Form 2:

    <form action="form3.php"  method="post">
      <input type="submit"> 
    </form>
    

    etc. etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an email confirmation page for registration which can be hit with a
So I have a registration page where the user registers with all his/her information
I have a user registration page where the user signs up for an event
I have an account registration form where a user can select their account type.
When adding new fields to the user registration page of a Drupal site the
I have a registration page with the following code below: in the views: def
I have a registration page, and because of content issues we have to request
I have created a registration page using CI that works fine. However, I encoded
I have a button on my registration Page (Windows Phone), in 30% of pushing
I have created a Drupal website with a new page for registration purposes. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.