点击电子邮件链接验证电子邮件地址

时间:2017-04-26 15:11:15

标签: php mysql

我正在尝试设置电子邮件验证表单,当有人在表单上注册时,链接会通过电子邮件发送到用户点击的电子邮件地址并激活其帐户。

我有电子邮件验证工作但由于某种原因它没有显示echo $ realname;

<?php error_reporting(E_ALL); ini_set('display_errors', 1);?>
<?php include("includes/header.php"); ?>
<?php include("includes/menu.php"); ?>
<?php include("includes/connect.php"); ?>

<?php 
     $email = $_GET['email']; 

//check if email is empty
if (isset($email)){
    //check if email has account

    $sql="SELECT * FROM `apply` WHERE email = '$email'";

    $result=mysqli_query($sql);

    $row=mysqli_fetch_array($result);

    $realname   =$row['real_name'];
    $address    =$row['address'];
    $telephone  =$row['telephone'];
    $email      =$row['email'];

    echo $realname;     

}else{
    echo "email problem";
}
?>

0 个答案:

没有答案