Notice: Undefined index: remember in C:\xampp\htdocs\E_COMMERCE\login.php on line 15
line15: $remember_p = $_POST['remember'];
it looks right to me. any ideas?
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$username_p = $_POST['username'];
$password_p = $_POST['password'];
$remember_p = $_POST['remember'];
.....
}
?>
<div id = "right_login">
<form id='login' action='login.php' method='POST'>
<h1>Log in to your account!</h1>
<?php
//print errors
if(array_key_exists('log_error', $_SESSION) && !empty($_SESSION['log_error']))
{
$log_error_r = $_SESSION['log_error'];
echo "<span id='error_print' tyle='background-color:#D00000;'> $log_error_r <br/></span>";
unset($_SESSION['log_error']);
}
?>
<div class="outer_hint">
<label>Username:</label>
<input type="text" name="username" id="login_username" class="field" value="<?php $val = $_POST['username']; echo $val;?>" />
<!-- HINT --><span class="hint">6 to 20 characters(letters and numbers only)</span>
</div>
<div class="outer_hint">
<label>Password:</label>
<input type="text" name="password_txt" id="login_password_text" class="field" value=""/>
<input type="password" name="password" id="login_password" class="field" value=""/>
<!-- HINT --><span class="hint">6 to 20 characters(letters and numbers only)</span>
</div>
<p class="forgot"><a href="#">Forgot your password?</a></p>
<div id="submit">
<button type="submit" id="login_button" class="button" >Log in</button>
<label>
<input type="checkbox" name="remember" id="login_remember" value="yes" />
<p id ="login_stay">Keep me signed in</p>
</label>
</div>
</form>
</div>