thank you page

Discussion in 'PHP' started by newbie12345, May 4, 2010.

  1. #1
    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. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="u_name" type="text"  size="35" maxlength="50">
      <br><br>
      FIRSTNAME:
      <br>
       Enter your first name. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="f_name" type="text" size="35" maxlength="50">
      <br><br>
      LASTNAME:
      <br>
      Enter your last name.
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="l_name" type="text" size="35" maxlength="50">
      <br><br>
    DATE OF BIRTH:
      <br>
      Enter your Date of Birth.
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="DOB" type="text" size="35" maxlength="50"> (in MM/DD/YYYY format)
      <br><br>
      Gender
      <br>
      Select your gender.
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="gender" type="radio" value="male">MALE
      <input name="gender" type="radio" value="female">FEMALE
      <br><br>
    ADDRESS:
      <br>
      Enter your ADDRESS
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="address" type="text" size="50" maxlength="50">
      <br><br>
      PASSWORD:
      <br>
      More than 5 characters.          
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
    <input name="pwd" type="password" size="35" maxlength="50">
      <br><br>
      VERIFY PASSWORD:
      <br>
      Verify your password.
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
     <input name="pwd1" type="password" size="35" maxlength="50">
      <br><br>
      EMAIL:
      <br>
      Enter your email address.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="e_address" type="text" size="35" maxlength="50">
      <br><br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Register" name="submit">
      <input name="reset" type="reset" value="Reset Information">
    </form>
    
    																																																								
    																																																								
    																																																								
    																																																																																																																	
    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    </div>
    </body>
    </html>
    PHP:
     
    newbie12345, May 4, 2010 IP
  2. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    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
     
    javaongsan, May 4, 2010 IP
  3. FriendSwapMeet.com

    FriendSwapMeet.com Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $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
     
    FriendSwapMeet.com, May 4, 2010 IP