SESSION Value Not updating Each Time

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
abrahamrkj
Forum Newbie
Posts: 14
Joined: Mon Nov 14, 2011 10:59 pm

SESSION Value Not updating Each Time

Post by abrahamrkj »

This is my php code after search the array query......

Code: Select all

while ($row = mysql_fetch_assoc($query))
         {

           $title = $row['gamename'];
           $description = $row['gamedes'];
           $keywords = $row['keywords'];
            

          echo "-->'$title'"; echo "------>'$description'"; echo '<table border="0"> <tr><td><form method="GET" action="msearchbookh.php"><input type="submit" value="Have It!"></form></td><td><form method="GET" action="msearchbookw.php"><input type="submit" value="Want It!"></form></td></tr></table><hr>';
 $_SESSION['title'] = $title;
         }
In the above post i have to return title of each result to nxt page....pls help.....Thanks in advanse
Last edited by Benjamin on Thu Nov 17, 2011 6:20 am, edited 1 time in total.
Reason: Added [syntax=php||htm||css||javascript||sql||etc] - Please use [syntax] tags when posting code in the forums! Thanks.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: SESSION Value Not updating Each Time

Post by Celauran »

Do you have session_start(); at the beginning of the page?
abrahamrkj
Forum Newbie
Posts: 14
Joined: Mon Nov 14, 2011 10:59 pm

Re: SESSION Value Not updating Each Time

Post by abrahamrkj »

Celauran wrote:Do you have session_start(); at the beginning of the page?

sss...i had ...actually it displays the Search result of many data......but session value only has the last value....but i want each at seperate session ...???
Post Reply