deathy150 Posted August 12, 2011 Share Posted August 12, 2011 I am creating a login form and when i return the registration details on my register page it does nothing - can anybody help? Here's the code for the registration page: <?php $return = $_POST['return']; $name = $_POST['name']; $username = $_POST['username']; $password = $_POST['password']; $rpassword = $_POST['rpassword']; if($return) { //this is just to output what the user enterd so that i can see if its working but is not... echo "$username/$name/$password/$rpassword"; } ?> <html> <from action='Register.php' method='POST'> <table> <tr> <td> <font face='arial'/> Enter Name: </td> <td> <input type='text' name='name'> </td> </tr> <tr> <td> <font face='arial'/> Enter username: </td> <td> <input type='text' name='username'> </td> </tr> <tr> <td> <font face='arial'/> Enter password: </td> <td> <input type='password' name='password'> </td> </tr> <tr> <td> <font face='arial'/> Enter password again: </td> <td> <input type='password' name='rpassword'> </td> </tr> </font> </table> <p> <input type='submit' name='return' value='Register'> </p> </form> </html> Link to comment https://forums.phpfreaks.com/topic/244630-help/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 12, 2011 Share Posted August 12, 2011 you didnt close any of your input tags? anyway its form not from tag. change your page to this code. <?php $return = $_POST['return']; $name = $_POST['name']; $username = $_POST['username']; $password = $_POST['password']; $rpassword = $_POST['rpassword']; if($return) { //this is just to output what the user enterd so that i can see if its working but is not... echo $username. "/" .$name. "/" .$password. "/" .$rpassword; } ?> <html> <form action='Register.php' method='POST'> <table> <tr> <td> <font face='arial'/> Enter Name: </td> <td> <input type='text' name='name'/> </td> </tr> <tr> <td> <font face='arial'/> Enter username: </td> <td> <input type='text' name='username'/> </td> </tr> <tr> <td> <font face='arial'/> Enter password: </td> <td> <input type='password' name='password'/> </td> </tr> <tr> <td> <font face='arial'/> Enter password again: </td> <td> <input type='password' name='rpassword'/> </td> </tr> </font> </table> <p> <input type='submit' name='return' value='Register'/> </p> </form> </html> edit: i re-edited the script. please use the new one Link to comment https://forums.phpfreaks.com/topic/244630-help/#findComment-1256484 Share on other sites More sharing options...
deathy150 Posted August 12, 2011 Author Share Posted August 12, 2011 Thank you very much - can't believe i dident notice that... Link to comment https://forums.phpfreaks.com/topic/244630-help/#findComment-1256486 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 12, 2011 Share Posted August 12, 2011 haha. no prob Link to comment https://forums.phpfreaks.com/topic/244630-help/#findComment-1256488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.