humbleprogrammer
Programmer
Hi,
I am not very familiar with PHP and am hoping someone can help me with sessions.
I am trying to store a querystring value in a session and if the value doesn't equal something, I want it to route the user back to the main page. If it does equal the specified value, I want it to stay on the same page and display the HTML. Currently the page isn't doing anything, it just shows up blank. Below is my code. Can someone please help? Thanks in advance!
<?php
session_start();
if(!session_is_registered("clientaccess"
)
{
session_register("clientaccess"
;
}
?>
<?php
$qryclientaccess = $_GET['clientaccess'];
if ($qryclientaccess) != ""
{
$clientaccess = $qryclientaccess;
}
if($clientaccess != "test"
{
header("location:../index.php"
}
?>
<html>
<head>
<title>Test User Page</title>
</head>
<body>
<br><br><br>
<p align="center"><b><font size="4" color="#800000">This is a test client
page...</font></b></p>
</body>
</html>
I am not very familiar with PHP and am hoping someone can help me with sessions.
I am trying to store a querystring value in a session and if the value doesn't equal something, I want it to route the user back to the main page. If it does equal the specified value, I want it to stay on the same page and display the HTML. Currently the page isn't doing anything, it just shows up blank. Below is my code. Can someone please help? Thanks in advance!
<?php
session_start();
if(!session_is_registered("clientaccess"
{
session_register("clientaccess"
}
?>
<?php
$qryclientaccess = $_GET['clientaccess'];
if ($qryclientaccess) != ""
{
$clientaccess = $qryclientaccess;
}
if($clientaccess != "test"
{
header("location:../index.php"
}
?>
<html>
<head>
<title>Test User Page</title>
</head>
<body>
<br><br><br>
<p align="center"><b><font size="4" color="#800000">This is a test client
page...</font></b></p>
</body>
</html>