hey im doing some php here and i wondering how can i have a tank you page let's say thank you $username for registering this is my code <?php include ('connect.php'); if (isset($_POST["submit"])){ $user = $_POST['u_name']; $first =$_POST['f_name']; $last = $_POST['l_name']; $birth = $_POST['DOB']; $sex = $_POST['gender']; $addres = $_POST['address']; $pass = $_POST['pwd']; $conpass = $_POST['pwd1']; $eaddress =$_POST['e_address']; $result= mysql_query ("INSERT INTO user_accounts (username, firstname, lastname, birthday, gender, address, password, confirm_password, email_address) VALUES ('$user', '$first', '$last', '$birth', '$sex', '$addres', '$pass', '$conpass', '$eaddress')"); } mysql_close($connection); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Street Vybz Muzik | Register</title> <link href="registerstyle.css" rel="stylesheet" type="text/css" /> <script src="register.js"> </script> </head> <body> <div id="whole_page_content"> <div id="logo_image"> </div> <div id="link_bg"> <div id="menu"> <ul> <li><a href="index.html">Home</a></li> <li><a href="news.html">News</a></li> <li><a href="music.html">Music</a></li> <li><a href="register.html">Register</a></li> </ul> </div> </div> <div id="other_link_background"></div> <div id="member_registration">MEMBER REGISTRATION---PLEASE FILL OUT THE FOLLOWING FIELDS</div> <div id="login_content"> <form name="registration" action="register.php" method="POST" onSubmit="return validation(this);"> USERNAME:<br> Between 5-15 characters. <input name="u_name" type="text" size="35" maxlength="50"> <br><br> FIRSTNAME: <br> Enter your first name. <input name="f_name" type="text" size="35" maxlength="50"> <br><br> LASTNAME: <br> Enter your last name. <input name="l_name" type="text" size="35" maxlength="50"> <br><br> DATE OF BIRTH: <br> Enter your Date of Birth. <input name="DOB" type="text" size="35" maxlength="50"> (in MM/DD/YYYY format) <br><br> Gender <br> Select your gender. <input name="gender" type="radio" value="male">MALE <input name="gender" type="radio" value="female">FEMALE <br><br> ADDRESS: <br> Enter your ADDRESS <input name="address" type="text" size="50" maxlength="50"> <br><br> PASSWORD: <br> More than 5 characters. <input name="pwd" type="password" size="35" maxlength="50"> <br><br> VERIFY PASSWORD: <br> Verify your password. <input name="pwd1" type="password" size="35" maxlength="50"> <br><br> EMAIL: <br> Enter your email address. <input name="e_address" type="text" size="35" maxlength="50"> <br><br> <input type="submit" value="Register" name="submit"> <input name="reset" type="reset" value="Reset Information"> </form> </div> </div> </body> </html> PHP:
first use javascript to do form verification then post to your sql insert statement on another page on this page you can use header location to redirect to thank you page
$result= mysql_query ("INSERT INTO user_accounts (username, firstname, lastname, birthday, gender, address, password, confirm_password, email_address)VALUES ('$user', '$first', '$last', '$birth', '$sex', '$addres', '$pass', '$conpass', '$eaddress')");} mysql_close($connection); include("thank.php"); Die(''); ?> and make a page named thank.php