Undefined index: in in /home/noob/public_html/admin/main.php
Posted: Mon Jun 05, 2006 7:07 pm
Ok,i decided to turn on error checking adn i see this error. what is the asiest way to find out the problem?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
It says array because i sued print_r for testing sessions(which i cant get to work)Array ( )
Notice: Undefined index: in in /home/noob/public_html/admin/main.php on line 15
Code: Select all
<?PHP
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Main Admin Page</title>
</head>
<body>
<?PHP
print_r($_SESSION);
error_reporting(E_ALL);
if($_SESSION['in'] != 'yes') {
echo 'You are not logged in,please go to <a href="http://avi.aerohostale.com/admin">Here</a> to login';
}
else {
echo 'Welcome to the admin page. This is the basic layout so far.<br>Please use one of the links below to do what you would like to.';
echo '<br>';
echo '<br>';
echo '<a href="http://avi.aerohostale.com/admin/addoffer.php">Add An Offer</a>';
echo '<br>';
echo '<a href="http://avi.aerohostale.com/admin/tabview.php">View Pending and Completed Offers</a>';
echo '<br>';
echo '<a href="http://avi.aerohostale.com/admin/pay.php">Make a Payment to Someone</a>';
}
?>Code: Select all
if(isset($_SESSION['in']) && $_SESSION['in'] != 'yes') {