Regarding redirect page in php
Posted: Thu Sep 25, 2008 12:49 am
hi all,
the below file name is saran.php
And the insert.php is
And after the record update the message box is enable. i need if i click the message box ok button it redirect to saran.php.
the below file name is saran.php
Code: Select all
[b]<form action="insert.php" method="post" name=" ">
Email Id <input type="text" name="emailid" /><br>
ResiPhone No <input type="text" name="resph" /><br>
Office Ph <input type="text" name="offph" /><br>
Mobile No <input type="text" name="mobile" /><br>
<input type="submit" />
</form>[/b]
Code: Select all
<?php
$con = mysql_connect('localhost','root','');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mydb", $con);
$sql="INSERT INTO los_master_detail (email,phone,resphone,mobile)
VALUES
('$_POST[email]','$_POST[phone]','$_POST[resphon]','$_POST[mob]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo("<SCRIPT LANGUAGE='JavaScript'>
window.alert('1 Record Has Been Updated')
</SCRIPT>");
mysql_close($con)
?>And after the record update the message box is enable. i need if i click the message box ok button it redirect to saran.php.