Php 当用户成功注册时,回显文本字段中的问题

Php 当用户成功注册时,回显文本字段中的问题,php,mysql,html,Php,Mysql,Html,我想在用户注册后给他们一条消息,告诉他们已经收到一封带有激活链接的邮件。他们注册后没有任何错误。但是,当我试图用文本回显他们的用户名和电子邮件时,我无法显示他们的用户名和电子邮件 这是我的密码: if(isset($_GET['action']) && $_GET['action'] == 'joined'){?> //I have som html code here but it doesnt have anything with the questi

我想在用户注册后给他们一条消息,告诉他们已经收到一封带有激活链接的邮件。他们注册后没有任何错误。但是,当我试图用文本回显他们的用户名和电子邮件时,我无法显示他们的用户名和电子邮件

这是我的密码:

    if(isset($_GET['action']) && $_GET['action'] == 'joined'){?>

    //I have som html code here but it doesnt have anything with the question to do so i deleted it.



     <?php


 $email =  $_GET['email'];
 $username =  $_GET['username'];
echo '<span style="color:#AFA;text-align:center;">Dear '.$username.' we have sent a mail to the email you registrered with :  '.$email.' please check both inbox and mail. To activate, click on the activation link in the mail. </span>'; $stmt = $db->prepare('select rank, memberid from members where memberid = ?');



    echo '<span style="color:#AFA;text-align:center;">Dear '.$username.' we have sent a mail to the email you registrered with :  '.$email.' please check both inbox and trash for the mail. To activate, click on the activation link in the mail. </span>';   $stmt = $db->prepare('select rank, memberid from members where memberid = ?');

        $stmt = $db->prepare('select rank, memberid from members where memberid = ?');
    $stmt->execute(array($_SESSION['memberID']));





     ?>
if(isset($\u GET['action'])&&&$\u GET['action']=='joined'){?>
//我这里有som html代码,但它没有任何问题,所以我删除了它。

因此,将显示文本,但不显示用户名和电子邮件。

您正在测试GET,但使用POST

if(isset($_GET['action']) && $_GET['action'] == 'joined'){?>

尝试在作业中使用GET-too

      $email =  $_GET['email'];
   $username =  $_GET['username'];

简单的答案是,您将输入引用为$\u-GET,然后在$\u-POST中显示数据。这可能有效,但不推荐使用。请查看表单语句中的
方法
,然后使用$\u-GET或$\u-POST处理整个问题。

检查是否设置了$\u-GET,然后从$\u-POST获取数据。这是您的意图吗ed?Post var_dump($_GET)和var_dump($_Post);我刚刚更新了我的问题,仍然没有运气:(有什么想法吗?使用var_dump($_GET)和var_dump($_Post)检查$_GET和$_Post的内容,并评估真实内容..这是我得到的..数组(1){[“action”=>string(6)“joined”}和数组(1){[“action”=>string(6)“joined”}它在说什么?为什么不显示用户名和电子邮件?这意味着您不使用GET format(url formatte?username=your_name&email=your)传递用户名和电子邮件的任何值_email@example.com..因此,您应该检查用于请求的代码……但我认为这是另一个问题。
      $email =  $_GET['email'];
   $username =  $_GET['username'];