vishalonne
Technical User
- Jul 29, 2012
- 49
Hi All
See the code give given below. I was fighting with this code since last 5 hours to know why isset() is eveluating the condition as false if value is posted exactly what it shall POST.
If I uncomment the line no. - 4,5,6,7,8 and put rest of the code from line no. 10 to 28 I can see the POSTED value .
Can Anyone help in this by any guidance or suggestion. I will be thankful.
See the code give given below. I was fighting with this code since last 5 hours to know why isset() is eveluating the condition as false if value is posted exactly what it shall POST.
If I uncomment the line no. - 4,5,6,7,8 and put rest of the code from line no. 10 to 28 I can see the POSTED value .
Can Anyone help in this by any guidance or suggestion. I will be thankful.
PHP:
<?php
include 'dbconnection.php';
include 'functions.php';
//sec_session_start();
// $email = $_POST['logemail'];
// $password = $_POST['p'];
// echo $password;
// echo $email;
// Our custom secure way of starting a php session.
if(isset($_POST['logemail'], $_POST['p'])) {
$email = $_POST['logemail'];
$password = $_POST['p']; // The hashed password.
if(login($email, $password, $mysqli) === true) {
// Login success
//$url = 'mwq';
//echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
echo $password;
echo $email;
} else {
// Login failed
header('Location: login.php?error=1');
}
} else {
// The correct POST variables were not sent to this page.
echo 'Invalid Request Data Not POSTED';
}