coldfiretech Posted August 20, 2008 Author Share Posted August 20, 2008 Changed that. Getting this though Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\cellsavior\userAuth.php on line 10 Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 20, 2008 Share Posted August 20, 2008 do u have php error reporting on??? try <?php $db_host = 'localhost'; $db_user = '****'; $db_pass = '****'; $db_db = '*****'; $con = mysql_connect($db_host, $db_user, $db_pass) or die('MySQl Connection Error:'.mysql_error()); mysql_select_db($db_db, $con) or die('MySQL Error: Cannot select table'); $user = mysql_real_escape_string($_POST['login']); $password = mysql_real_escape_string($_POST['password']); $q = " SELECT login, subtype FROM `users` Where login = '".$user."' AND password = '".$password."' "; $r = mysql_query($q,$con) or die(mysql_error()."<br /><br />".$q); if(mysql_num_rows($r) >0){ $row = mysql_fetch_assoc($r); switch ($row['subtype']){ case "single": die(header("location: /****/single.php")); break; case "partner": die(header("location: /****/partner.php")); break; case "family": die(header("location: /***/family.php")); break; default: die(header("location: index.html?msg=invalid subtype")); } } else{ die(header("location: index.html?msg=invalid login")); } mysql_close ($con); ?> Quote Link to comment Share on other sites More sharing options...
coldfiretech Posted August 20, 2008 Author Share Posted August 20, 2008 THANK YOU!@~!!!!!!!!!!!!! [bows down] I appreciate all of everyones help.. Sorry for being a grump! Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 20, 2008 Share Posted August 20, 2008 you have another problem you aren't authenticating the user any where (sessions or cookies) so look at some basic login tutorials and see how to make it better. Quote Link to comment Share on other sites More sharing options...
Third_Degree Posted August 23, 2008 Share Posted August 23, 2008 At third degree: ppl shouldn't be able to turn it off its very helpful it's annoying though. 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.