hi there,
have just installed wamp server (apache,php5,mysql,phpmyadmin) and I upload my web site files into the www directoy
while browsing through the web pages the following php error appear and I tried to resolced the error, but i couldn't
can you please advice me or help me this thread
the message is:
Notice: A session had already been started - ignoring session_start() in C:\wamp\www\Leftlogin.php on line 2
Notice: Undefined index: redirect in C:\wamp\www\Leftlogin.php on line 5
Notice: Undefined index: prodID in C:\wamp\www\Leftlogin.php on line 7
and the code is:
<?php
session_start();
//get the value of redirect if there is one provided, and assign it to $redir
$redir = $_GET['redirect'];
$prID = $_GET['prodID'];
if(!isset($REQUEST['username']))
{
//if there is no username provided with the url, then call the form function and provide the error code 0 and the option 0
form(0,0);
}
if (isset($REQUEST['username']))
{
if(empty($username) || empty($password))
{
//check if the username/passwords are empty if so then call form and give values 2 and 0
form(2,0);
}
else
{
// if username/password are both available then call the check button which will see if they are acceptable in the system or not.
check();
}
}
function form($error, $option)
{
// if there is a global variable called redir then call it within the function
global $redir, $prID;
//include("header.php");
echo "<br>";
//check the error number that came in and deal with it accordingly.
if($error == 1)
{
error_messages("Sorry but either the username or the password you provided is incorrect<br> Please try again");
}
else if($error == 2)
error_messages("You cannot leave the username/password fields empty<br>");
?>