I have a very simple script as below and when I run this, I get empty page on browser. I notice that the problem is on this line :
"AND account.Login_id='$mylogin_id'";
If I replace '$mylogin_id' with the login_id for example (123847290) in my database, the whole script works well.
Could someone tell me what I am missing in the script?
<?php
session_start();
$connect=mysql_connect("localhost","root","123")
or die("Check your server connection.");
mysql_select_db("UserBalance");
$bal="SELECT account.Balance, ownerdetails.Name " .
"FROM account, ownerdetails " .
"WHERE account.Login_id=ownerdetails.Login_id " .
"AND account.Login_id='$mylogin_id'";
$result=mysql_query($bal)
or die (mysql_error());
while ($row=mysql_fetch_assoc($result))
{
extract($row);
echo $Balance;
echo "<br>";
echo $Name;
echo "<br>";
}
?>