RE: [PHP] An annoying session problem

2006-06-19 Thread phpninja
td colspan=5?php $userid ? ?php $_SESSION['username'] ?/td that should be ?= $_SESSION['username'] ? or ?php echo $_SESSION['username']; ? its all in how you call the variables.. ?php $somevar ? isint telling the variable to do anything. -phpninja -Original Message- From: Alex

Re: [PHP] An annoying session problem

2006-06-19 Thread Alex Major
Thanks for pointing that out, however I've changed the code to: ?php // Lets see how much the person has at the moment. $current_resource_query = SELECT food, wood, stone, gold, population FROM game_resources WHERE user_id = '.$_SESSION['user_id'].'; $current_resource_result =

Re: [PHP] An annoying session problem

2006-06-19 Thread Stut
Alex Major wrote: Thanks for pointing that out, however I've changed the code to: ?php // Lets see how much the person has at the moment. $current_resource_query = SELECT food, wood, stone, gold, population FROM game_resources WHERE user_id = '.$_SESSION['user_id'].';

Re: [PHP] An annoying session problem

2006-06-19 Thread tedd
Alex Major wrote: And I'm still not getting the output correctly. I don't think that the SELECT query is working properly, is there problem with how I've put: WHERE user_id = '.$_SESSION['user_id'].' Maybe I'm all wet here, but what's the the periods? Why isn't it: WHERE user_id =

Re: [PHP] An annoying session problem

2006-06-19 Thread tedd
At 12:27 AM +0700 6/20/06, Gmail nya Suprie wrote: tedd wrote: Alex Major wrote: And I'm still not getting the output correctly. I don't think that the SELECT query is working properly, is there problem with how I've put: WHERE user_id = '.$_SESSION['user_id'].' Maybe I'm all wet

Re: [PHP] An annoying session problem

2006-06-19 Thread Alex Major
Hmpf, well I feel like a real tit now. I tried all the posted suggestions, and still couldn't figure out why it wasn't working. I went back to re-code the whole page from scratch, started off with include 'connection.php', then it hit me...i hadn't included the connection file in the parent file

Re: [PHP] An annoying session problem

2006-06-19 Thread Richard Lynch
On Mon, June 19, 2006 10:26 am, Alex Major wrote: Hi there. I'm working my way through a new script, but I've stumbled into a problem. Some data that I've set into a session, won't be processed by part of my php code, but then later on in the page I can get the session value to output.