Jump to content


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


[SOLVED] what could be the problem?

Recommended Posts

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


but if the user is sent to a error in checkuserphp and submits it again it sends the users to


and since no such directory excist it sends the user to a error 404 page..

why this happens?

[!--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">
<td><p>User name :<br>
<input name="username" type="text" id="username" size="12" />
</p> </td>

<input name="password" type="password" id="password" size="12" />
</p> </td>
<td><span class="style3"><a href="signup.php">
<input type="submit" name="Submit" value="Submit">
</a>or <a href="signup.php">signup </a></span></td>

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?
/* Check User */
session_start(); // Start Session

include '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';

Share this post

Link to post
Share on other sites


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.