$_SESSION variables
Moderator: General Moderators
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
$_SESSION variables
Does php allow you to do this? When i try retrieving the values they come up as 0.
Last edited by anthony88guy on Thu May 12, 2005 5:54 pm, edited 1 time in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
you are performing the query, but never retrieving the values.
Code: Select all
$result = mysql_query("SELECT * FROM users WHERE user = '$user' LIMIT 1") or die(mysql_error());
$row = mysql_fetch_assoc($result);
$_SESSION['strikeaction'] = $row['strikeaction'];
$_SESSION['armysize'] = $row['armysize'];-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: