Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Need advice

  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Thanked 0 Times in 0 Posts

    Need advice

    this code does not seem to work. need advice. i have verified it does see the email and password and also connects to db.

    if(isset($_POST['email']) && !empty($_POST['email'])){

    if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
    echo $email;

    $email = false;
    $approve= false;

    if(isset($_POST['p']) && !empty($_POST['p'])){
    $pass= hash('sha512',$_POST['p']);
    echo $pass;
    $approve= false;

    if($email && $pass && $mysqli == true){

    if ($stmt = $mysqli->prepare("SELECT id, username, password, salt FROM members WHERE email = ? LIMIT 1")) {
    $stmt->bind_param('s', $email); // Bind "$email" to parameter.
    $stmt->bind_result($user_id, $username, $db_password, $salt);
    if($stmt->num_rows == 1) {
    echo 'yes';



    thanks in advance

  2. #2
    Senior Coder durangod's Avatar
    Join Date
    Nov 2010
    southwestern USA
    Thanked 47 Times in 45 Posts
    i didnt notice anything right off, but you have so many functions its hard to tell where something could be wrong. It could be in any function.

    Are you getting any errors, can you share the functions with us ?

    so you have checked the value of

    $email && $pass && $mysqli
    And they all have the correct value?

    if they all have the correct value then the break in the code is after that i would think because it made it that far. So check your functions, db classes and such. You might try removing all the functions and code it freehand and see if it works, if it does then you know its your functions or classes.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts