whelpton Posted March 2, 2011 Share Posted March 2, 2011 Hey guys, Currently Im using: $row = mysql_fetch_array($result) or die(mysql_error()); echo $row['user_family']. " - ". $row['user_registered']; $row['user_family'] = $fam; $_SESSION['family'] = $fam; to take data from a mysql table & set it as SESSION family. However, I cant seem to get this to set. The information IS being taken from mysql because its being echo'd earlier up in the code, but its just not passing to the session. Any ideas? Quote Link to comment Share on other sites More sharing options...
ZacTopher Posted March 2, 2011 Share Posted March 2, 2011 is session_start() present anywhere? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted March 2, 2011 Share Posted March 2, 2011 In addition to the above re: session_start(), this appears to be backwards: $row['user_family'] = $fam; Most likely should be: $fam = $row['user_family']; Quote Link to comment Share on other sites More sharing options...
whelpton Posted March 2, 2011 Author Share Posted March 2, 2011 Yeah session start is there in the code. It was all to do with the reverse row. THanks for your help guys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.