Hello,
I have my code as follows
<?php
session_start();
$member = $_SESSION['member'];
// MySQL Connection Variables
// Fill in your values for the next 4 lines
$hostname='localhost';
$user='xxxxxx'; //'user name for MySQL database';
$pass='xxxxxx'; //'Password for database';
$dbase='xxxxxx'; //'database name';
$connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL");
$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");
$qChk = "select 1 from ngen_challenges where 1='$member'";
$rsChk = mysql_query($qChk);
if (mysql_num_rows($rsChk) != '1')
{ print(" $member false");}
else
{print(" $member true");}?>
I have a page that logs in and regesters a session with the value of member being the users membership name in this case it is "rootj4m13" without the quotes.
and in my table called ngen_challenges i have the table 1 with a row with the value of rootj4m13.
However whenever i view my code above i get
rootj4m13 false however it should be true?
am i doing something wrong..
Thanks