I've had a look at the function suggested in more detail, but don't see how this will assist me. Reading the php.net notes on the function it specifically says it will not suppress headers.
I'm really stuck as to how to approach this code. I have written all the code within a function to allow me to throw back errors to the page the user is filling out, but I obviously need to include these files and thus I cannot seem to get around the header error.
I've restructured my code, but maybe a fresher set of eyes may be able to make a suggestion I haven't already thought about.
<?php
// Get Posted Variables
$process = $HTTP_POST_VARS['process'];
$name = $HTTP_POST_VARS['name'];
$dob1 = $HTTP_POST_VARS['dob1'];
$dob2 = $HTTP_POST_VARS['dob2'];
$dob3 = $HTTP_POST_VARS['dob3'];
$location = $HTTP_POST_VARS['location'];
$email = $HTTP_POST_VARS['email'];
$username = $HTTP_POST_VARS['username'];
$password1 = $HTTP_POST_VARS['password1'];
$password2 = $HTTP_POST_VARS['password2'];
// Include Files
include("includes/mail.php");
include("includes/functions.php");
$errors = Signup($process, $name, $dob1, $dob2, $dob3, $location, $email, $username, $password1, $password2);
if($errors == "3"){
header("Location: confirm.php");
exit;
}
?>