")]; $bad2 = $counts[ord("<")]; $bad3 = $counts[ord("|")]; if ($bad1 != 0 || $bad2 != 0 || $bad3 != 0) { // unset($_POST["barc_username"]); unset($_POST["barc_password"]); $badchar = 1; } } if ($badchar != 1) { //////////////////////////////// // This will catch if someone is trying to submit a blank // or incomplete form. //////////////////////////////// $barc_username=$_POST["barc_username"]; $barc_password=$_POST["barc_password"]; if ($barc_username && $barc_password) { //////////////////////////////// // This is the authentication code //////////////////////////////// mysql_connect("89.46.111.187","Sql1426292","e5833162ji") or die("Unable to connect to SQL server"); mysql_select_db("Sql1426292_1") or die("Unable to select database"); $query = "SELECT * FROM barc_users "; $query .= "WHERE barc_username='$barc_username' and barc_password=password('$barc_password')"; $user=mysql_query($query); $num = mysql_num_rows($user); $user=mysql_fetch_array($user); if ($num != "0") { $id=$user["id"]; $barc_logins=$user["barc_logins"]; if ($barc_logins == 0){ session_start(); $_SESSION['id']=$id; $_SESSION['disclaimer']="n"; header("Location: disclaimer.php"); exit; } else { $barc_logins++; mysql_connect("89.46.111.187","Sql1426292","e5833162ji") or die("Unable to connect to SQL server"); mysql_select_db("Sql1426292_1") or die("Unable to select database"); $query = "UPDATE barc_users SET barc_logins='$barc_logins' WHERE id='$id'"; mysql_query($query) or die("Insert Failed!!!!!"); session_start(); $_SESSION['id']=$id; $_SESSION['disclaimer']="y"; header("Location: memberhome.php"); exit; } } else { $notauthenticated = 1; } } else { //////////////////////////////// // If they didn't include all the required fields set a variable // and keep going. //////////////////////////////// $notall = 1; } } } ?> BARC
Technical
Sponsor

barc images

Join BARC

register

statistics

Member area
Upload/Download

username
password

NEWS & EVENTS

alert('$msg');"; } else if ($notauthenticated == 1){ $msg="USER UNKNOWN!"; echo ""; } else if ($badchar == 1) { $msg="SPECIAL CHARACTERS ARE NOT ALLOWED!"; echo ""; } ?>