Click here to Skip to main content
15,904,416 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
Questionerror in login page Pin
Jassim Rahma10-Dec-11 2:14
Jassim Rahma10-Dec-11 2:14 
Hi,

can anyone help please.

I am getting this error:

VB
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/jassimrahma/JassimRahma.com/admin/get_login.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at /home/jassimrahma/JassimRahma.com/admin/get_login.php:10) in /home/jassimrahma/JassimRahma.com/admin/get_login.php on line 20


here is my code:

PHP
<?php
	session_start();
	
	$username = $_POST['username'];
	$password = $_POST['password'];

    $dbC = mysql_connect('mysql.jassimrahma.com', 'jassimdb', 'mujtaba');
    $sql = "SELECT * FROM website_admin WHERE website_admin_user_name = '$username' and website_admin_password = '$password'";
	$result = mysql_query($sql, $dbC);
	$count = mysql_num_rows($result);
	
	if($count == 1)
	{
		// session_regenerate_id();
		$_SESSION['status'] = 'logged';
		header("location:index.php");
	}
	else
	{
		header("location:login.php");
	}
?>

AnswerRe: error in login page Pin
Graham Breach10-Dec-11 3:46
Graham Breach10-Dec-11 3:46 
GeneralRe: error in login page Pin
Jassim Rahma10-Dec-11 3:55
Jassim Rahma10-Dec-11 3:55 
GeneralRe: error in login page Pin
Graham Breach10-Dec-11 4:10
Graham Breach10-Dec-11 4:10 
Questionplz help - htaccess Pin
Jassim Rahma9-Dec-11 2:52
Jassim Rahma9-Dec-11 2:52 
QuestionSimple PHP Pin
omanzo_barrett8-Dec-11 8:39
omanzo_barrett8-Dec-11 8:39 
QuestionHelp me in configuring the PHP .How to run a PHP program Pin
VickyVicki8-Dec-11 4:32
VickyVicki8-Dec-11 4:32 
AnswerRe: Help me in configuring the PHP .How to run a PHP program Pin
awedaonline8-Dec-11 10:01
awedaonline8-Dec-11 10:01 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
VickyVicki9-Dec-11 4:38
VickyVicki9-Dec-11 4:38 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
awedaonline9-Dec-11 4:48
awedaonline9-Dec-11 4:48 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
VickyVicki9-Dec-11 5:55
VickyVicki9-Dec-11 5:55 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
awedaonline11-Dec-11 11:01
awedaonline11-Dec-11 11:01 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
Gerben Jongerius11-Dec-11 19:29
Gerben Jongerius11-Dec-11 19:29 
GeneralRe: Help me in configuring the PHP .How to run a PHP program Pin
VickyVicki12-Dec-11 5:28
VickyVicki12-Dec-11 5:28 
QuestionAMPPS Perl Pin
Paul15866-Dec-11 2:06
Paul15866-Dec-11 2:06 
AnswerRe: AMPPS Perl Pin
Albert Holguin7-Dec-11 7:42
professionalAlbert Holguin7-Dec-11 7:42 
GeneralRe: AMPPS Perl Pin
jschell30-Dec-11 8:55
jschell30-Dec-11 8:55 
GeneralRe: AMPPS Perl Pin
Albert Holguin3-Jan-12 18:19
professionalAlbert Holguin3-Jan-12 18:19 
AnswerRe: AMPPS Perl Pin
jschell30-Dec-11 8:57
jschell30-Dec-11 8:57 
GeneralRe: AMPPS Perl Pin
Phil Hartfield10-Jan-12 8:25
Phil Hartfield10-Jan-12 8:25 
QuestionReturn list of object from a Class Pin
awedaonline5-Dec-11 22:36
awedaonline5-Dec-11 22:36 
AnswerRe: Return list of object from a Class Pin
Graham Breach5-Dec-11 23:54
Graham Breach5-Dec-11 23:54 
GeneralRe: Return list of object from a Class Pin
awedaonline6-Dec-11 0:22
awedaonline6-Dec-11 0:22 
GeneralRe: Return list of object from a Class Pin
Graham Breach6-Dec-11 0:52
Graham Breach6-Dec-11 0:52 
GeneralRe: Return list of object from a Class Pin
awedaonline6-Dec-11 1:01
awedaonline6-Dec-11 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.