Problem with session content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
madsobelcph
Forum Newbie
Posts: 1
Joined: Sat Feb 25, 2012 5:52 am

Problem with session content

Post 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
temidayo
Forum Contributor
Posts: 109
Joined: Fri May 23, 2008 6:17 am
Location: Nigeria

Re: Problem with session content

Post 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
Post Reply