We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,578 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Display Data from session variable

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);
1
Contributor
1
Reply
26 Minutes
Discussion Span
9 Months Ago
Last Updated
2
Views
Question
Answered
xbat
Junior Poster in Training
Banned
83 posts since Jun 2012
Reputation Points: -4
Solved Threads: 0
Skill Endorsements: 0

I fingered it out it was

session start

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

xbat
Junior Poster in Training
Banned
83 posts since Jun 2012
Reputation Points: -4
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 9 Months Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.2035 seconds using 2.67MB