jeudi 20 avril 2017

how to pass session value other page if condition true in php

i have a $_sesstion['usermail']. i want to pass this value to next page.if condition match ($answer= $_SESSTION['usermail']);

if(isset($_POST['compair']))
{

    echo $_SESSION['question'];
     $_SESSION['usermail'];
    $answer=$_POST['answer'];
    if ($answer ==  $_SESSION['answer'])
    {
         header("Location:resetpass.php");

    }
    else
    {
         echo "<script>alert('Please Try again')</script>";

    } 

}

i want to pass $_sesstion['usermail'] value on resetpass.php page.

Aucun commentaire:

Enregistrer un commentaire