Jump to content
MakeWebGames

Recommended Posts

Posted

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...

Posted

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? :/

Posted

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...

Posted

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");
}

?>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...