Here is my code.. I'm not sure if there is easyier way of doing this or not.. but pretty much what im looking to do is display the user invoice from a session variable.. the session variable would be MM_Username.

$colname_curinvoice = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_curinvoice = $_SESSION['MM_Username'];
mysql_select_db($database_ff, $ff);
$query_curinvoice = sprintf("SELECT * FROM onrental WHERE `user` = %s", GetSQLValueString($colname_curinvoice, "text"));
$curinvoice = mysql_query($query_curinvoice, $ff) or die(mysql_error());
$row_curinvoice = mysql_fetch_assoc($curinvoice);
$totalRows_curinvoice = mysql_num_rows($curinvoice);

I fingered it out it was

session start

Turns out somewhere in the header it was getting closed out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.