vinson89 Posted May 18, 2014 Share Posted May 18, 2014 I have a sign up form to send the activation code to the new user via email.My question is how to restrict the user who is not a member using activation form page in PHP unless their use a sign up form first? here is my sign up form and activation form: sign up form <style type="text/css"><!--.style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12;}.style5 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;}.style7 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }--></style><form name="form1" method="post" action="email-activation-script.php"><div align="center"><p class="style5"> Form Registration </p><table width="35%" border="0"><tr><td class="style7">Username</td><td class="style7">:</td><td class="style1"><span class="style7"><label><input name="username" type="text" id="username"></label></span></td></tr><tr><td class="style7"> Email </td><td class="style7">:</td><td class="style1"><span class="style7"><label><input name="email" type="text" id="email"></label></span></td></tr><tr><td class="style7">Password</td><td class="style7">:</td><td class="style1"><span class="style7"><label><input name="password" type="password" id="password"></label></span></td></tr><tr><td class="style7"> </td><td class="style7"> </td><td class="style1"><span class="style7"><label><input type="submit" name="Submit" value="Register"><input type="reset" name="Submit2" value="Cancel"></label></span></td></tr></table></div></form> activation form: <form name="form1" method="post" action="check-activation-script.php"><div align="center"><table width="35%" border="0"><tr><td>Username</td><td>:</td><td><label><input name="username" type="text" id="username"></label></td></tr><tr><td>Activation Code </td><td><label>:</label></td><td><input name="activation_code" type="text" id="activation_code"></td></tr><tr><td> </td><td> </td><td><label><input type="submit" name="Submit" value="Submit"><input type="reset" name="Submit2" value="Cancel"></label></td></tr></table></div></form> Link to comment https://forums.phpfreaks.com/topic/288580-activation-form-access-restriction/ Share on other sites More sharing options...
ginerjm Posted May 18, 2014 Share Posted May 18, 2014 1 - USE CODE TAGS per the forum's rules. 2 - learn how to use css and stop using it wildly and needlessly. 3 - then show us the PHP code that you are using since that is where your question really lies, not in the html. BTW - here is a cleaned up version of your html from above. Had to do it. It was horrible. sign-up form (?) <html> <head> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .style5 { font-size: 16px; font-weight: bold; } </style> </head> <body> <form name="form1" method="post" action="email-activation-script.php"> <div> <center> <p class="style5"> Form Registration </p> <table width="35%" border="0"> <tr> <td class='style7'>Username</td> <td class="style7">:</td> <td class="style7"> <input name="username" type="text"> </td> </tr> <tr> <td class="style7">Email</td> <td class="style7">:</td> <td class="style7"> <input name="email" type="text"> </td> </tr> <tr> <td class="style7">Password</td> <td class="style7">:</td> <td class="style7"> <input name="password" type="password"> </td> </tr> <tr> <td> </td> <td> </td> <td class="style7"> <input type="submit" name="Submit" value="Register"> <input type="reset" name="Submit2" value="Cancel"> </td> </tr> </table> </center> </div> </form> activation form(?): <form name="form1" method="post" action="check-activation-script.php"> <div> <center> <table width="35%" border="0"> <tr> <td>Username</td> <td>:</td> <td> <input name="username" type="text"> </td> </tr> <tr> <td>Activation Code </td> <td>:</td> <td><input name="activation_code" type="text"></td> </tr> <tr> <td> </td> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Cancel"> </td> </tr> </table> </center> </div> </form> Took out the extra span tags and the un-used label tags. Cleaned up your css and re-defined some of it. Now let's get to your php code - hopefully it is in better shape than you html/css is Link to comment https://forums.phpfreaks.com/topic/288580-activation-form-access-restriction/#findComment-1479952 Share on other sites More sharing options...
Jacques1 Posted May 18, 2014 Share Posted May 18, 2014 Hi, I don't really get your question. The activation code already proves that the user has gone through the registration procedure. What more do you need? Link to comment https://forums.phpfreaks.com/topic/288580-activation-form-access-restriction/#findComment-1479986 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.