Note that there are some explanatory texts on larger screens.

plurals
  1. POerrors handling on footer should pop up
    primarykey
    data
    text
    <p>just as i know that is the login form and the register form is need to have the error handling and i'm using a php for the main code language, there is such an errors handling if i put into an php language its kind of silly, i mean the design is more or less than nothing</p> <p>i want to put an error handling like "Your Username and Password Combination is Incorrect", 'We Can\'t Find That Username', 'You Need To Enter a Username And a Password',</p> <p>on the footer page it will pop up message if the user is do something wrong with the form</p> <p>this is my code <strong>html</strong>:</p> <pre><code>&lt;div id="header"&gt; &lt;div id="header-content"&gt; &lt;div id="logo"&gt; &lt;a href="index.php" style="text-decoration:none;"&gt; logo&lt;/a&gt; &lt;/div&gt; &lt;div id="searchbox"&gt; &lt;input type="text" placeholder="Search" size="50" class="searchbox"&gt; &lt;/div&gt; </code></pre> <p><strong>PHP</strong></p> <pre><code>if(empty($_POST) === false){ $username = $_POST['input-username']; $password = $_POST['input-password']; if(empty($username) === true || empty($password) ===true){ $errors[] = 'You Need To Enter a Username And a Password'; } else if(user_exists($username) === false){ $errors[] = 'We Can\'t Find That Username'; } else{ $login = login($username, $password); if($login === false){ $errors[] = 'Your Username and Password Combination is Incorrect'; } else{ $_SESSION['user_id'] = $login; header('Location: home.php'); } } print_r($errors); } </code></pre> <p>and back to form in <strong>html</strong></p> <pre><code>&lt;div id="users"&gt; &lt;form method="post" action="" name="signin-form"&gt; &lt;table border="1"&gt; &lt;tr&gt; &lt;td&gt;Username&lt;/td&gt; &lt;td&gt; &lt;input type="text" name="input-username" id="input-username"&gt; &lt;/td&gt; &lt;td&gt;Password&lt;/td&gt; &lt;td&gt; &lt;input type="password" name="input-password" id="input-password"&gt; &lt;/td&gt; &lt;td&gt; &lt;input type="submit" name="sign-in" id="sign-in" value="Log in"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2"&gt; &lt;input type="checkbox" name="remember-me"&gt; &lt;label id="information"&gt;Keep Me Eating Picture&lt;/label&gt; &lt;/td&gt; &lt;td colspan="2"&gt; &lt;a href="#" id="forgotpass"&gt;Forgotten My Username or Password&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;button id="sign-up"&gt;Sign Up&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>there is some core items that i can't show in here such as connect to database and function page(which is the page full of function that i need)</p> <p>im showing this code for information that i'm using array errors handling but i want to show the error message on footer side somebody please help me btw sorry for my english, and thx for your concern</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload