Right, this is what I have set up at the moment.
The initial index.html page with a username and password box as well as a link for new users to sign up. The sign up works ok. Now I want to to set up a personal message accross the top of the screen greeting the user after they have logged on. The information entered in the index.html page is processed by my login.php script which then forwards the user to the members.php page. The script I have at the top of the member page is as follows:
<?php
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass)))
{
die(mysql_error());
}
mysql_select_db($DB);
$query_name="SELECT firstname, lastname from $Table WHERE username='" . $_POST['username'] . "'";
$result=mysql_query($query_name)
or die(mysql_error());
echo "$result";
?>
Although the page is printed (without the greeting), I get the following:
Notice: Undefined index: username in c:\web\member.php on line 18
Resource id #3.
Then the member page is printed.
As $_POST is a system array, I am right in thinking that once it's been submitted on the index.html page, processed by the login.php page, it still exists for processing by other pages?
Any pointers would be appreciated.