Hi just getting started with PHP
I've already put some basic code together on my hosting space using PHP and MySQL together and that seems to be working ok.
I now what to create a login area for administrators but when I upload the script it spits back the following error message
you might recognise this little bit of code from a certain PHP book!!??PHP Code:<?php
session_start();
// If session variable doesen't exist, register it
if (!isset($_SESSION['test'])) {
$_SESSION['test'] = 'Hello World!';
echo '$_SESSION[\'test\'] is registered.<br />' . 'Please refresh page';
} else {
// Itsregistered so display it
echo '$_SESSION[\'test\'] = ' . $_SESSION['test'];
}
?>
but when I test it I get this error
Warning: Cannot send session cache limiter - headers already sent (output started at /home/danielgold/public_html/php/sessions/3.php:2) in /home/danielgold/public_html/php/sessions/3.php on line 3 $_SESSION['test'] is registered.
Please refresh page
my php setting can be view at info.php
any ideas??





Bookmarks