Jump to content

registration page


porko2004

Recommended Posts

i am creating a registration page and i would like to add a verification page can anyone help me.

 

 

index.php

 

<table cellspacing="1" cellpadding="5">

<tr>

<td class="listtitle" colspan="2"><span class="stylered1"><font color="#FF0000">Attention:</font></span><br>

                              Getting a account will allow you to log into

                              CoPals.

                              <p><strong>Reminder:</strong><br>

                              Please <span class="stylered1"><font color="#FF0000">remember</font></span>

                              all the information you provide below to ensure

                              the safety of your account. You can write them

                              down and keep in a safe place, but do not share

                              the information with anybody. If you need to speak

                              with a customer service representative regarding

                              your account in the future, we will ask you to

                              provide the following information for your

                              security.</p>

                               </td>

</tr>

<tr>

<td class="listtitle" colspan="2" width="508"><strong><font size="3" color="#0000FF">Part

                              One - Account & Password</font></strong></td>

</tr>

<form action="register_do.php" method="POST">

<td class="list" align="right" width="242">Username:

                                  <p> </p>

                                  <p> </p>

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="name" maxlength="30" />

                                <p><span id="txtAccount_info">* 4-15 characters.

                                Only letters and numbers.</span></p>

                                <p><span id="txtAccount_info"><font color="#0000FF" size="2">We

                                advise you to click register after adding

                                username to see if its available. (if No password filled in you may continue.)</font></span></p>

                                </td>

 

</tr>

<tr>

<td class="list" align="right" width="242">Password:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="password" name="pass" maxlength="30" />

                                <p><span id="txtPassword_info">* 10-14

                                characters. Only letters and numbers.</span></p>

                                </td>

</tr>

<tr>

<td class="list" align="right" width="242">Confirm Password:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="password" name="pass1" maxlength="30" />

                                <p><span id="txtPassword_info">* 10-14

                                characters. Only letters and numbers.</span></p>

                                </td>

</tr>

 

<tr>

<td class="listtitle" colspan="2" width="508">

                              <hr color="#416d56" noshade="noshade" size="2">

                              <p><strong><font size="3" color="#0000FF">Part Two

                              - Contact Data (Confidential)</font></strong></p>

                          </td>

                        </tr>

 

 

<tr>

<td class="list" align="right" width="242">Real Name:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="realname" maxlength="50" />

                                <p><span id="txtRealName_info">Real name should

                                be no more than 12 characters</span></p>

                                </td>

</tr>

 

<tr>

<td class="list" align="right" width="242">Email Address:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="email" maxlength="50" />

                                <p><span id="txtEmail_info">* Must be valid</span></p>

                                </td>

</tr>

 

<tr>

<td class="list" align="right">Verify Email Address:</td>

<td class="list">

<input type="text" name="email1" maxlength="50" /></td>

</tr>

  <tr>

<td class="listtitle" colspan="2" width="508">

                              <p>* Your email address is used to

                              identify your account. You must have access to the

                              above e-mail. Any further customer service issues

                              related to this account will be directed to this

                              email address. The email address can only be

                              changed by using the 'Change Email' function on

                              the official webpage. You must also have your

                              Identification Data in order to change your email

                              address.</font></p>

                          </td>

                        </tr>

<tr>

<td class="listtitle" colspan="2" width="508">

                              <hr color="#416d56" noshade="noshade" size="2">

                              <p><strong><font size="3" color="#0000FF">Part Three -

                              Identity Data (Confidential and unchangeable)</font></strong></p>

                          </td>

                        </tr>

 

 

<tr>

<td class="list" align="right" width="242">Identification No.:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="ident" maxlength="20" />

                                <p><span id="txtPaperCard_info">* Minimum 8

                                digits</span></p>

                                </td>

</tr>

<tr>

<td class="list" align="right" width="242">Re-type Identification No.:</td>

<td class="list" width="252">

<input type="text" name="ident1" maxlength="20" /></td>

</tr>

<tr>

<td class="list" align="right" width="242">Secret Question:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="secque" maxlength="60" />

                                <p><span id="txtPaperCard_info0">* Minimum 2

                                digits</span></p>

                                </td>

</tr>

<tr>

<td class="list" align="right" width="242">Answer:

                                  <p> </p>

                                </td>

<td class="list" width="252">

<input type="text" name="secanw" maxlength="20" />

                                    <p><span id="txtPaperCard_info1">* Minimum 4

                                    digits</span></p>

                                </td>

</tr>

 

<tr>

<td class="list" align="right">Re-type Answer:

<br />

<i>Ex. Google</i></td>

<td class="list">

<input type="text" name="secanw1" maxlength="20" /></td>

</tr>

 

 

 

 

 

<p><img src="visual-captcha.php" width="200" height="60" alt="Visual CAPTCHA" /></p>

 

<p><a href="audio-captcha.php">Can't see the image? Click for audible version</a></p>

<tr>

<td class="listtitle" colspan="2" width="508">

                              <p>* Your Identification Number and Security

                              Question are used to identify the account as

                              yours. Please memorize them and do not share them

                              with anyone else. The ID number and security

                              question can not be changed, however, they will be

                              needed if you wish to change your email address.</p>

                          </td>

                        </tr>

                        <tr>

<td class="listtitle" align="center" colspan="2">

<form action="accept.php" method="post">

<fieldset style="width:93%; height: 220px; overflow: auto;">

<legend>Accept the Terms</legend>

<br>

<p>

<font color="#0000FF">If you have trouble registering an Account, please email us at</font>

<a href="mailto:[email protected].">[email protected].</a>

 

</p><br>

<label><input type="checkbox" name="tos_accept" value="true" onclick="if(this.checked){this.form.submit.disabled=false;}

else{this.form.submit.disabled=true;}">  <font color="#FF0000"><B>I Agree</B></font></label><br><br>

 

<p><font color="#008000">By selecting the "I Agree" button, you indicate

 

that you have read and understand the </font><a href="terms.htm"> User Agreement</a>

<font color="#008000"> of CoPals.</font>

 

 

</p>

 

</fieldset>

<br>

<br>

<label><button type="submit" name="submit" value="Register" disabled>Register</button></label>

</form>

                          </td>

                        </tr>

<tr>

 

 

</tr>

</form>

</table>

 

 

register_do.php

 

<?php

 

/* Store user details */

$name = $_POST['name'];

$email = $_POST['email'];

$email1 = $_POST['email1'];

$secque = $_POST['secque'];

$secanw = $_POST['secanw'];

$secanw1 = $_POST['secanw1'];

$ident = $_POST['ident'];

$ident1 = $_POST['ident1'];

$realname = $_POST['realname'];

$pass = $_POST['pass'];

$pass1 = $_POST['pass1'];

include('config.php');

$sel = 'SELECT * FROM account WHERE name="'.$_POST['name'].'"';

if($name == ""){

echo 'No account filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif(mysql_num_rows(mysql_query($sel)) >= 1 ){

echo 'This account already exists!';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($pass == ""){

echo 'No password filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($pass1 == ""){

echo 'No password filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($realname == ""){

echo 'Real Name not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($email == ""){

echo 'Email not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($email1 == ""){

echo 'Email not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

}elseif($email != $email1){

echo 'The emails did not match.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

}elseif($ident == ""){

echo 'Identification No not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($ident1 == ""){

echo 'Identification No not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

}elseif($ident != $ident1){

echo 'The Identification No did not match.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

}elseif($secanw == ""){

echo 'Answers not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

}elseif($secanw1 == ""){

echo 'Answers not filled in.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

}elseif($secanw != $secanw1){

echo 'The Answers did not match.';

echo '<br><br><a href="index.htm">Return to registration page</a>';

exit();

 

 

}elseif($pass != $pass1){

echo 'The Passwords did not match.';

echo '<br><br><a href="reg.php">Return to registration page</a>';

exit();

}else{

 

$d = 'INSERT INTO account (name, password) VALUES ("'.$name.'", "'.$pass.'")';

$d1 = 'INSERT INTO account_detail (loginname, password, email, realname, secretquestion, answer, identification) VALUES ("'.$name.'", "'.$pass.'", "'.$email.'", "'.$realname.'", "'.$secque.'", "'.$secanw.'", "'.$ident.'")';

mysql_query($d) AND mysql_query($d1) OR die (mysql_error());

echo 'Congratulations, you have succesfuly created account, have fun and enjoy CoPals.';

echo '<br><br><a href="../index.htm">Return to main page</a>';

}

?>

 

 

please help me add it.

Link to comment
https://forums.phpfreaks.com/topic/140360-registration-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.