[請益] 圖形驗證的功能
當我正確輸入圖片驗證碼時
Verify failed. correct code is "圖片顯示的code", you typed
"key in的code"
後者應該要顯示我輸入的code,可是卻一直出現空白?
完整測試檔 http://140.116.5.200/~q3697405/test.rar
其中verify.html可以驗證圖形驗證可以執行
可是整合到我的contact-us.html就一直出現上述問題
是不是下面的程式檔哪裡出現了問題呢?
1.驗證的php檔
<?php
session_start();
$ara = explode("|", $_SESSION['vCode']);
if($ara[0] == $_POST['code']){
echo("Verify Success. code is ".$ara[0]);
}else{
echo("Verify failed. correct code is ".$ara[0].", you typed
".$_POST['code']);
}
?>
2.html的表單內容
<!-- start the Contact form -->
<form name="contact_form" method="post" class="vs3form" onSubmit="return
check();" action="verify_check.php">
<fieldset>
<legend>Compose Your Message</legend>
<table cellpadding="0" cellspacing="0" border="0" summary="Contact Us">
<!--圖形驗證機制的換圖-->
<tr>
<td></td>
<td><span class="captcha_image">
<img src="verify_image.php" alt="點此刷新驗證碼" name="verify_code"
width="150" height="60" border="0" id="verify_code"
onclick="document.getElementById('verify_code').src='verify_image.php?' +
Math.random();" style="FILTER:
wave(add=0,freq=3,lightstrength=50,phase=0,strength=3);cursor:pointer;" /><br
/>
<br />Please enter characters you see above in the box below to validate this
form.</span>
</td>
</tr>
<tr>
<td><label for="captcha_response">Characters</label></td>
<td><input type="text" class="textbox" id="captcha_response"
name="captcha_response"> </td>
</tr>
</table>
</fieldset>
</form>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.39.5.78
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
1
2
PHP 近期熱門文章
PTT數位生活區 即時熱門文章