Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form name="registration_form" method="post" action="user_confirm.php"
- onsubmit="return Validate();">
- User Name:
- <input type="text" name="username"/><br /><br />
- Password:
- <input type="password" name="password" /><br /><br />
- Retype Password:
- <input type="password" name="password_confirmation"><br /><br />
- Name:
- <input type="text" name="name" /><br /><br />
- Phone Number:
- <input type="text" name="phone_number"><br />
- <br />
- <input type="submit" value="Click here to confirm" /><br />
- </form>
- <?php
- $username= $_POST['username'];
- $name = $_POST['name'];
- $phone_numbe = $_POST['phone_numbe'];
- echo $username "<br>";
- echo $name "<br>";
- echo $phone_number " <br>";
- ?>
- <form action="register2_db.php" method="post">
- <input type="hidden" name="redirect_values" value="true">
- <input type="submit" name="confirm" value="Confirm Details">
- <input type="button" name="return" value="Return to data" onClick="javascript: window.history.back(-1)";>
- </form>
- <?
- $host="localhost"; // Host name
- $username="fissioni"; // Mysql username
- $password="password("; // Mysql password
- $db_name="fissioni_test"; // Database name
- $tbl_name="members"; // Table name
- // Connect to server and select databse.
- mysql_connect("$host", "$username", "$password")or die("cannot connect");
- mysql_select_db("$db_name")or die("cannot select DB");
- $query = 'insert into members (username,password,name,phone_number)
- values
- (
- "' . $_POST['username'] . '",
- "' . md5($_POST['password']) . '",
- "' . $_POST['name'] . '",
- "' . $_POST['phone_number'] . '",
- )';
- $result = mysql_query($query);
- if($result){
- echo '<h1>Thank you</h1> <br> Go back to the main page <a href="index.html");';
- }else{
- echo "ERROR: ".mysql_error();
- }
- ?>
- <form action="register2_db.php" method="post">
- <input type="hidden" name="name" value="<?php echo $name?>">
- <input type="hidden" name="password" value="<?php echo $password?>">
- <input type="hidden" name="username" value="<?php echo $username?>">
- <input type="hidden" name="phone_number" value="<?php echo $phone_number?>">
- <input type="hidden" name="redirect_values" value="true">
- <input type="submit" name="confirm" value="Confirm Details">
- <input type="button" name="return" value="Return to data" onClick="javascript: window.history.back(-1)";>
- </form>
- <form action='final.php' method = 'POST'>
- <input type = 'hidden' name = 'username' value='<?php echo $username;?>' />
- ....
- </form>
- <?php
- echo $username "
- "; echo $name "
- "; echo $phone_number "
- ";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement