Associate
- Joined
- 19 Oct 2005
- Posts
- 528
Hey folks im trying to drag customer number from the database that is equal to the current session logged in. I have the session working and i have it logged in but the code doesnt seem to work.
Custname is the session variable maybe its a problem with that?
Any help would be appreciated thankyou.
Custname is the session variable maybe its a problem with that?
<?php
$CustNumber = $_REQUEST['CustName'];
echo $_REQUEST['CustNumber'];
// Connect to the database.
include("db_connect.php");
// Query the database.
$query = "SELECT CustNumber from Customer WHERE CustName = '$CustNumber'";
$query_result = @mysql_query ($query);
$row = @mysql_fetch_array ($query_result);
if ($row > 1)
{?>
<table border="2" cellpadding="1" cellspacing="1">
<tr><td><b>CustNumber</b></td><td><?php echo $row[CustNumber]?></td></tr>
</table>
<?php
}
else
{
print "That record was not found.\n";
}
?>
Any help would be appreciated thankyou.