hi,
i'm connecting to my database and placing the connection in a variable like so
<?php
$conn = mysql_connect("localhost", "*", "*");
$db = mysql_select_db("theuther_content", $conn);
$_SESSION['conn'] = $conn;
?>
and calling to it as normal.
However on one of my pages i am using session_unset(); to help a logout process...
<?
session_unset();
unset($_SESSION['blogger']);
unset($_SESSION['auth']);
if (empty($_SESSION['blogger'])) {
echo "Logged Out";
}
else {
echo "NOT Logged Out";
}
?>
and then when i call to $conn later in my page i get an error saying that the link identifier is invalid.
I assume that when $_SESSION['conn'] is unset the contents of it are unset (the $conn variable), but why does this happen?