A VBS code about the verification code, please turn the master into PHP code
VBScript Code
<% ' Determines whether the OK button is pressed, and if pressed, compares the verification code with the correct if Request.QueryString ("Submit") <> "then Dim checkcode,sessioncode Checkcode = Trim (Request.QueryString ("Checkcode")) sessioncode=session ("Verifycode") ' The following two sentences are used to convert the registration code to all uppercase and can be easily entered by the user Checkcode=ucase (checkcode) sessioncode=ucase (sessioncode) If Checkcode = Sessioncode then response.redirect ("http://www.hzynh.cn") "Enter the download address here, after verifying the success can jump to the download address Else Response.Write ("") End If End If%>
------Solution--------------------
PHP code
!--? phpif (!empty ($_request[' submit '])) {$checkCo de = Strtoupper (Trim ($_request[' checkcode ')); $sessionCode = Strtoupper ($_session[' Verifycode '); if ($checkCode = = $sessionCode) echo ""; else echo "";}? -->
------Solution--------------------
!--? php
if (isset ($_post[' submit '))
{
$checkCode =trim ($_ post[' Checkcode ');
Session_Start ();
$sessionCode =$_session[' Verifycode ');
Session_destroy ();
$checkCode =ucase ($checkCode);
$sessionCode =ucase ($sessionCode);
if ($checkCode = = $sessionCode)
{
Header ("location:http://www.hzynh.cn");
}
Else
{
echo "";
}
}
?
------Solution--------------------
If you are reading a PHP session, then you are not enabled session
missing Session_ Start ();
If you try to read the session of the ASP, then I'm sorry, you can't read the