I can't seem to read veriables globally through out my web site.
ex:
snippet from login.php
<?php
session_start();
session_register("ok");
$_SESSION['ok'] = false;
$connection = mysql_connect("host", "user", "password");
$db = mysql_select_db("service",$connection) or die(mysql_error());
$sql = "SELECT tid FROM technician WHERE username='$POST[user]' and password='$POST[password]'";
$query = mysql_query($sql) or die(mysql_error());
$valid = mysql_numrows($query);
if ($valid == 1) {
$_SESSION['ok'] = true;
header("location: http://host/at.php");
exit;
}
else if ($valid == 0) {
header("location: http://host/login.php");
exit;
}
?>
snippet from another php file:
<?php
if ($_SESSION['ok'] == false) {
header("Location: http://host/login.php");
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us">
<head>
thanks
Jeff