Jesse60905 Posted June 29, 2007 Share Posted June 29, 2007 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\supercountry\authenticate.php on line 12 I am runnig V1 ($75) and when trying to log-in on my wamp server to test some files this is all I am getting... By the way my MySql is set-up. I am going to test something else to see if it is linking correctly... Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted June 29, 2007 Share Posted June 29, 2007 Re: Error in V1 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\supercountry\authenticate.php on line 12 I am runnig V1 ($75) and when trying to log-in on my wamp server to test some files this is all I am getting... By the way my MySql is set-up. I am going to test something else to see if it is linking correctly... Make sure line 12 is: $uq=mysql_query("SELECT userid FROM users WHERE login_name='{$_POST['username']}' AND `userpass`=md5('{$_POST['password']}')",$c) or die(mysql_error()); Also have you edited it any way? :/ Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted June 29, 2007 Author Share Posted June 29, 2007 Re: Error in V1 No I haven't edited it at all. Also what is line 12 supposed to be. I must have a glitch because I see no text in there =/ It keeps happening to my computer on some sites... Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted June 29, 2007 Author Share Posted June 29, 2007 Re: Error in V1 Now I see the text... Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted June 29, 2007 Author Share Posted June 29, 2007 Re: Error in V1 Still the same error. Also would it help if I posted authenticate? I bet it would... I can't wait until I learn this so I don't have to keep asking 4 help... Authenticate.php <?php session_start(); if ($_POST['username'] == "" || $_POST['password'] == "") { die("<h3>Your Game Name Error</h3> You did not fill in the login form! <a href=login.php>> Back</a>"); } include "mysql.php"; global $c; $uq=mysql_query("SELECT userid FROM users WHERE login_name='{$_POST['username']}' AND `userpass`=md5('{$_POST['password']}')",$c) or die(mysql_error()); if (mysql_num_rows($uq)==0) { die("<h3>Your Game Name Error</h3> Invalid username or password! <a href=login.php>> Back</a>"); } else { $_SESSION['loggedin']=1; $mem=mysql_fetch_array($uq); $_SESSION['userid']=$mem['userid']; header("Location: loggedin.php"); } ?> 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.