Warning: Cannot modify header information - headers already sent by (output started at C:\web\xampp\htdocs\www\includes\overall\header.php:2) in C:\web\xampp\htdocs\www\register.php on line 57
<?php
if (isset($_GET['success']) && empty($_GET['success'])){
echo 'you registered';
} else {
if (empty($_POST) === false && empty($errors )=== true){
$register_data = array (
'username' => $_POST['username'],
'password' => $_POST['password'],
'first_name' => $_POST['first_name'],
'last_name' => $_POST['last_name'],
'email' => $_POST['email']
);
register_user($register_data);
header('location: register.php?success');
exit();
} else if(empty($errors)===false){
echo output_errors($errors);
}
}
?>