I have been close to finding my error but I can't... please help me with the problem I have with my PHP signup form -
I have signup page, index page, login page and logout page and I set redirect statement as below;
$error = array();
$error[] = "each time false is returned print some message here";
if (count($error) === 0)
{
header('location: ./login.php');
(I wish I could paste the whole page code and I don't even know where the problem really is...)
When I click submit button on signup form, it goes to a blank page and when there is an error it shows on the blank screen but when the signup is successful it doesn't show anything and stay on the blank page.
My HTML is like this
<h3>Please enter username and password to sign up</h3>
<form action="./signup.php" method="post">
Username: <input type="text" name="username" placeholder="User name"><br>
Password: <input type="password" name="password" placeholder="Password"><br>
<input type="submit" value="Sign up">
</form>
Can you tell what could be the problem? Thanks so much for the help in advance...