Hi, ive got a problem.
If working of a server with the code below, i have no problems, everything works perfectly.
BUT when run the same code locally, it sends me this error message
Notice: Undefined variable: do in c:\wwwroot\skill_system\validate_login.php on line 3
Anyone know the problem please!!??
<?
switch( $do ) // - LINE 3
{
case "authenticate":
include ("valcon.php");
$sql = "SELECT * FROM user WHERE password='$password' AND user_id='$user_id'";
$result = mysql_query($sql, $connection) or die("Couldn't execute query.");
$num = mysql_num_rows($result);
if ($num == 1)
{
header("Location: [url]http://adamb_xp/skill_system/welcome.php?user_id=[/url]$user_id");
}
else
if ($num == 0)
{
unset($do);
include("badlogin.php");
}
}
?>