Jump to content

Problem with session contents


madsobelcph

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/257694-problem-with-session-contents/
Share on other sites

More detail would help. What are your expected results? and what is actually happening?

 

I expect it to print the filename of the image stated in the database. And nothing happens. I does not get the filename. Although i use the exact same piece of code on a different page, and it works just fine.

Well i think the problem is in the following lines:

 

 $r=mysql_query("select * from product where suspend='No' and prod_id=$_SESSION[product]");
         $product=mysql_fetch_array($r);

and

        <img src="http://artemisinvest.dk/anpo/proimgs/th/'.$_SESSION['product'].'" width="139" height="184" />

 

However, i does not get an error message. It just dosen't show up.

 

Could it be something with that i use the same varible in a another file?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.