Php website background construction (verification code) has an exception. could you modify it?
Source: Internet
Author: User
Php website background construction (verification code) error, please help modify I want to determine whether the entered verification code is consistent with the verification code on the image, $ _ SESSION [code] is the image verification code, number is (! & Lt; input & nbsp; namenumber & nbsp; typetext & nbsp; maxlength4 & nbsp; & gt;) I entered a text box to verify that php website background construction (verification code) has an error, please help modify
I want to determine whether the entered verification code is consistent with the verification code on the image. $ _ SESSION ['code'] is the image verification code, and number is (!
) How can I modify the verification code entered in the text box?
The program is as follows. I guess the problem lies in the sentence if ($ _ POST ['Number'] ==$ _ SESSION ['code ']).
Header ("Content-type: text/html; charset = gb2312"); // sets the file encoding format
Class chkinput {
Var $ name;
Var $ pwd;
Function chkinput ($ x, $ y)
{
$ This-> name = $ x;
$ This-> pwd = $ y;
}
Function checkinput ()
{
Include ("../conn. php ");
$ SQL = mysql_query ("select * from tb_admin where name = '". $ this-> name. "'", $ conn );
$ Info = mysql_fetch_array ($ SQL );
If ($ info = false)
{
Echo"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service