Hi all,
In my application there is a link in page 1 by name "plan", when it is clicked it directs to page2 which contains a form with many fields and submit button. When the user clicks the submit button, php and mysql code is written in page3 to store data in mysql. Here is code I am using
page2
My problem is when the form is submitted in the page 2, I need to go to page 1 instead of page 3, but I can't write the php code in page 1 instead of page 3 because of some security reasons.
How can I solve this problem, how to redirect from page 3 to page 1 after execution of page 3 code. Can anybody help me
With regards
page3
In my application there is a link in page 1 by name "plan", when it is clicked it directs to page2 which contains a form with many fields and submit button. When the user clicks the submit button, php and mysql code is written in page3 to store data in mysql. Here is code I am using
page2
Code:
<form name="plan" action="page3.php" method="POST"> Name : <input type="text" name="Uname"> Age: <input type="text" name="Uage"> <input type="submit" value="GO"> </form>
How can I solve this problem, how to redirect from page 3 to page 1 after execution of page 3 code. Can anybody help me
With regards
page3
Code:
<?php
$Uname = $_POST['Uname'];
$Uage = $_POST['Uage'];
$sql = "INSERT INTO user_info(user_name,user_age) VALUES('$Uname','$Uage')";
$result = mysql_query($sql);
?>
Comment