Here is the code from the first page which gets $email and $password from a form. I run email validation, based on that I redirect to the appropriate location, passing email and password thru the url.
function is_email_valid($email) {
if(eregi("[a-z0-9.-]+@+[a-z0-9.-]+.+[a-z]{2,3}$", $email)) return TRUE;
else return FALSE;
}
if (is_email_valid($email)){
header("Location: http://localhost/page.php?email=$email&password=$password");
}else{
header("Location: http://localhost/index.php?id=login&status=failed");
}
here's the code on page.php, I call this function thru a case statement later in the script:
function newUser($email, $password){
global $email;
global $password;
localConnect();
MySQL_query("insert into table_1(field1, field2) values ('$email', '$password');");
}
If you need any more info, let me know, thanks