Hi, below is the very start of my code for a login screen. I need to use a cookie so i can carry the username of the user through to another welcome page and display their information stored in a database.
<?$username = $_POST['UserName'];
setcookie("user",$username);?>
<?php include("header.inc");?>
These are the errors is get:
Notice: Undefined index: UserName in C:\Program Files\Apache Group\Apache2\htdocs\Login.php on line 1
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\Login.php:1) in C:\Program Files\Apache Group\Apache2\htdocs\Login.php on line 2
Can anyone help me to solve these??
Thanks for any help