Results 1 to 5 of 5
  1. #1
    NightFallTV's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    Question MySQL Need help fast

    im getting an error on mysql when im trying to login as admin

    Code:
    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/xxxxx/public_html/xxxx/login.php on line 17
    this is where the error starts:

    Code:
    		$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
    		$result=mysql_query($sql);
    		$count=mysql_num_rows($result);  <------------- ERROR
    		if($count >= 1){
    		session_register("myusername");
    		session_register("mypassword");
    		header("location: index.php");
    		} else {
    			
    		}
    	}

  2. #2
    NotMindroixen's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0
    My Mood
    Aggressive
    Hope u will find help

  3. #3
    Turtle's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    RIGGED
    Posts
    2,928
    Reputation
    420
    Thanks
    660
    My Mood
    Tired
    x.x I would help but its 8 am and my brain feels fried


  4. #4
    TheTrueKing's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    394
    Reputation
    13
    Thanks
    37
    My Mood
    Psychedelic
    Try to check for typos maybe ^^

  5. The Following User Says Thank You to TheTrueKing For This Useful Post:

    NightFallTV (05-21-2016)

  6. #5
    NightFallTV's Avatar
    Join Date
    May 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by TheTrueKing View Post
    Try to check for typos maybe ^^
    there are none.

    EDIT: this is the error i'm getting
    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''admins' WHERE username='test' and password='test'' at line 1

    - - - Updated - - -

    It's solved
    Last edited by NightFallTV; 05-21-2016 at 01:58 PM. Reason: mysql error

Similar Threads

  1. [Help Request] awesomenium deleted need help fast
    By wGRWGHWGRERGrgergergrg in forum Alliance of Valiant Arms (AVA) Help
    Replies: 4
    Last Post: 06-07-2013, 10:53 AM
  2. [Help Request] <<<<<<<<< DELPHI 7 - NEED HELP FAST !! >>>>>>>>>
    By logobalogo in forum CrossFire Help
    Replies: 3
    Last Post: 02-27-2013, 05:14 PM
  3. [Help Request] Need help fast
    By OmarQortam in forum CrossFire Help
    Replies: 9
    Last Post: 02-27-2013, 12:01 AM
  4. [Help Request] NEED HELP FAST PLZ
    By loko151 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 9
    Last Post: 08-21-2012, 10:03 PM
  5. [Help Request] I need Help Fast! :(
    By soldierkiller in forum Combat Arms Help
    Replies: 13
    Last Post: 05-24-2011, 04:54 PM