I am having a problem with passing variables. This is the code that I think should pass the $user variable to new_page.html:
if (mysqli_query($con,$newUser))
{
$user = $_GET[username];
header('Location: new_page.html?currentUser=$user');
}
else
{
header('Location: sign up.html');
}
And inside the html page I try to create a link to a new page with the user variable (which has been passed in) as the text property:
<a href = "user_page.php"> <?php echo $currentUser ?><a/>
Can anyone see what I am doing wrong?
Thanks