timbruningtwine
New member
Why does this not work? Its supposed to go fetch a number out of the database question_id and if that number equals one write Your security Question is <B>What is your middle name?</B> to the screen if it equals two write Your security Question is <B>Where were you born? to the screen, everytime i only get a blank screen.
Please help xD
<?php
$con = mysql_connect("host","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("newsite", $con);
$result = mysql_query("SELECT question_id FROM accounts_more WHERE acc_login = '".$a_user['login']."'") or die (mysql_error());
if (question_id == 1)
{
echo "Your security Question is <B>What is your middle name?</B>";
}
if (question_id == 2)
{
echo "Your security Question is <B>Where were you born?</B>";
}
echo "<br />";
mysql_close($con);
?>
PS: i replaced the
$con = mysql_connect("host","user","pass");
part on purpose so i know there is supposed to be my servers information i know that information is correct.
Please help xD
<?php
$con = mysql_connect("host","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("newsite", $con);
$result = mysql_query("SELECT question_id FROM accounts_more WHERE acc_login = '".$a_user['login']."'") or die (mysql_error());
if (question_id == 1)
{
echo "Your security Question is <B>What is your middle name?</B>";
}
if (question_id == 2)
{
echo "Your security Question is <B>Where were you born?</B>";
}
echo "<br />";
mysql_close($con);
?>
PS: i replaced the
$con = mysql_connect("host","user","pass");
part on purpose so i know there is supposed to be my servers information i know that information is correct.