簡體   English   中英

Facebook注冊-重定向到URL,包括一些$響應

[英]facebook registration - redirect to url including some $response

我正在使用fb:registration插件,並以signed_request的形式獲取一些數據。 一切正常,但是如果用戶已經存在於我的數據庫中,我希望該用戶使用電子郵件和密碼進行驗證。 因此,我檢查電子郵件是否已經存在,以及是否存在,用戶必須使用(預填寫的)電子郵件和密碼填寫表單。

這是我的實際代碼:

$email =$response["registration"]["email"]; 
$emailcheck = mysql_query("SELECT email FROM member WHERE email = '".$email."' LIMIT 1");

if (mysql_num_rows($emailcheck) >0)
   { redirect ('http://www.my-site.de/fbregconfirm.php?go=fbcheck&fbid=$email'); }

在fbregcheck.php上,我有以下代碼:

<form action="fbregconfirm.php" method="POST">
e-Mail:<input type="text" name="email" value="email"><br>
Password:<input type="text" name="password"><br>
<input type="submit" value="regok">
</form>

當我運行我的實際代碼時,URL總是返回我:

http://www.my-site.de/fbregconfirm.php?go=fbcheck&fbid=$email 

但它應該顯示類似

http://www.my-site.de/fbregconfirm.php?go=fbcheck&fbid=info@example.com

我怎么了 忘記了$ _POST或$ _GET的東西嗎?

PHP不會解析單引號字符串中的變量,因此

redirect ('http://www.my-site.de/fbregconfirm.php?go=fbcheck&fbid=$email');

應該

redirect ('http://www.my-site.de/fbregconfirm.php?go=fbcheck&fbid=' . $email);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM