PHP & MySQL Login Error

Links for php scripts

Moderators: macek, egami, gesf

delta87uk
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Aug 03, 2011 5:32 pm

PHP & MySQL Login Error

Postby delta87uk » Wed Aug 03, 2011 5:41 pm

Firstly, hello all. I'm a new to the is forum as well as PHP/MySQL.
I've downloaded quite a nice log-in script which I can attach to this post.
I have my webhosting with 1&1 and have the option to create upto 10 MySQL databases. I have created one and I have entered the details into my login_config.php file as per the instructions... now here's the odd thing. it works on my best friend's server but it doesn't work on mine.

Any help would be more than appreciated.

Oh, yeah as for error codes etc I get this message even though everything is correct. I don't understand how it works on my friend's server and not mine.

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /homepages/36/d355163479/htdocs/dng_uk/register/login_config.php on line 66
Couldn't execute query
Attachments
PHP_Login.ZIP
PHP_Login zip folder containing all my files. Only need to edit login_config.php
(27.64 KiB) Downloaded 46 times

Gangedm
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Sep 13, 2011 9:01 pm

Re: PHP & MySQL Login Error

Postby Gangedm » Tue Sep 13, 2011 9:28 pm

Hello do you want to perfect login script, then email me on gangedm@gmail.com

My gtalk chat id is Gangedm@gmail.com

Come online...!

NigelRen
php-forum Active User
php-forum Active User
Posts: 450
Joined: Fri Aug 05, 2011 9:53 am

Re: PHP & MySQL Login Error

Postby NigelRen » Wed Sep 14, 2011 11:29 am

Could you just comment out lines 65 & 66 as the same thing is done a few lines below. Also the lines below use 'or die' to ensure that any errors cause the script to stop.

tank
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Oct 28, 2011 6:52 am

Re: PHP & MySQL Login Error

Postby tank » Fri Oct 28, 2011 7:10 am

Always when debugging display error messages

Code: Select all

65: $numresults=mysql_query($query) or die(mysql_error());
Since your not getting an error for your connection or DB select i must assume that something is going on with the sql statement. your copy of the datbase table users may not be as identical as you think


Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest