I have a form and when I fill it out and hit the submit button I try to register these variable on the next page with a session but get the error:
Warning: Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\backyardautos\item.php:9) in C:\Program Files\Apache Group\Apache2\htdocs\backyardautos\item.php on line 36
The error occurs here:
<?
session_start();
$Fname = $_POST['Fname'];
session_register("Fname");
echo "$Fname";
session_unset();
?>
This is my first time with sessions so I'm a little confused. I know headers are sent at the top of a page but how can I make this work?
Thanks,
Scuba