我有以下的PHP腳本,但它似乎爲會話始終檢查,因此回聲出「請輸入正確的密碼之前,用戶甚至已經進入了一個碼。的onclick提交檢查PHP
我想。在之前的代碼實際上火災確實爲會話和形式的崗位檢查click事件怎麼可以這樣在PHP做
這裏是我的代碼:?
<?php
session_start();
if (md5($_POST['norobot']) == $_SESSION['randomnr2'])
{
// here you place code to be executed if the captcha test passes
echo "Code correct - email should send now";
}
else {
// here you place code to be executed if the captcha test fails
echo "Code incorect please try again";
}
?>
我的提交按鈕看起來像這樣:
<input type="submit" id="submit_btn" class="button" value="Submit" />
你似乎沒有會話值被設置爲任何事情的任何... –