corillo181 Posted April 20, 2006 Share Posted April 20, 2006 my problem here is that if the user puts the wrong name or leaves it blank.. once they enter it again the form takes the user to another sub-directory.. lets say the register was under scripts folder..the original url would be scripts/checkuser.php.. but if the user is sent to a error in checkuserphp and submits it again it sends the users to scripts/scripts/checkuser.php...and since no such directory excist it sends the user to a error 404 page..why this happens?form.html[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<form id="form1" name="form1" method="post" action="../scripts/check_user.php"> <table width="0%" border="0"> <tr> <td><p>User name :<br> <input name="username" type="text" id="username" size="12" /> </p> </td> </tr> <tr> <td><p>Password:<br> <input name="password" type="password" id="password" size="12" /> </p> </td> </tr> <tr> <td><span class="style3"><a href="signup.php"> <input type="submit" name="Submit" value="Submit"> <br> </a>or <a href="signup.php">signup </a></span></td> </tr> </table></form></body></html>[/quote]check.php[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?/* Check User */session_start(); // Start Sessioninclude 'db.php';// Conver to simple variables$username = $_POST['username'];$password = $_POST['password'];if((!$username) || (!$password)){ echo "Please enter ALL of the information! <br />"; include 'login_form.html'; exit();}?>[/quote] Quote Link to comment Share on other sites More sharing options...
corillo181 Posted April 20, 2006 Author Share Posted April 20, 2006 sorry bout that one i just had the directory wrong.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.