Hi,
I am storing a database value in a session. This value is a number.
something like this:
$query = "select * from access";
$result = mysql_query($query);
if(!$result) {die("Query didn't work " . mysql_error());}
else{
while ($row = mysql_fetch_array($result) ){
$_SESSION['catagory'] = $row["catagory"];}
Lets say the number it retrieves from the database is 32
It seems as if this number is stored into this session as text, like:
$_SESSION['catagory'] = "32";
instead of
$_SESSION['catagory'] = 32;
Is this possible? If so, what should I do to make sure it's stored as a number (like : $_SESSION['catagory'] = 32)?
I ask this because when I use this session variable later on in my script things get messed up, when I replace the session variable for a number, things work fine.