Thanks brian. I should have stated that this IS all in 1 php file. i used page 1 and page to as an example..my fault.
So yes its in 1 file. That same php will 'post to itself' and check the feilds. If one is off it will ask you to go back.
here is the beginning of that page:
<?
include("common.php");
session_register("current_user");
$current_user = "";
session_unset();
session_destroy();
I thought by registering the session that it will hold all info. The prob isthis part of the code:
$num_rows = 0;
//make sure there isn't another person by that name
$sql = "SELECT * FROM agents WHERE agent = '$agent'";
$output = mysql_query($sql,$link);
$num_rows = mysql_num_rows($output);
if ($num_rows > 0)
{
print "There is already an agent by that name. Please try another name.<P>";
}
elseif ($agent == "")
{die ("<P>Please Enter A Name!<P><FORM><INPUT TYPE=\"BUTTON\" VALUE=\"BACK\" onClick=\"history.back()\"></FORM>");}
elseif ($agentpass == "")
{die ("<P>Please Enter A Password!<P><FORM><INPUT TYPE=\"BUTTON\" VALUE=\"BACK\" onClick=\"history.back()\"></FORM>");}
elseif ($agentemail == "")
{die ("<P>Please Enter an Email Address!<P><FORM><INPUT TYPE=\"BUTTON\" VALUE=\"BACK\" onClick=\"history.back()\"></FORM>");}
else
//success! Go ahead and add the account.
The javascript will take you back to the form..but all data is lost.