Page 1 of 1

Problem with session content

Posted: Sat Feb 25, 2012 5:54 am
by madsobelcph
Hi guys.

This is my first post here, so excuse me if i am posting this in the wrong forums.
I am making a website, and having a huge problem.

The script is used for orders of different services. And i am using sessions to store the information through serveral pages.
But my problem is that on my final page, where the script sends an email with i can not get it to view the contents of one session.
I am using the same session on a different page and it works like a charm. When i try debugging the session it won't print the contents, so i am guessing something is very wrong?

My code of the page is bellow, let me know if you need anything else:
http://pastebin.com/YHh3bGWS

Please help me :D

Re: Problem with session content

Posted: Mon Feb 27, 2012 2:07 pm
by temidayo
Do you mean you cannot get your product id at this point:

Code: Select all

$r=mysql_query("select * from product where suspend='No' and prod_id=$_SESSION[product]");
Change that line to this:

Code: Select all

$r=mysql_query("select * from product where suspend='No' and prod_id=".$_SESSION[product]);
Notice the concatenation is done differently