Code written by PHP rookie
Rookie write the message board login code you big God help me See, why to click Login two times to log in, why to click two times to exit to quit? The problem is where the big God help me see, thank you first. The code is as follows:
Exit
Reply to discussion (solution)
I do not know what is wrong, look at the big God to guide the Fan Sutra
After correcting the "variable undefined" warning, you do not see the phenomenon you said
But you can't rule out a problem in sql.php or head.php.
Post your include file to see if it's strange.
Post your include file to see if it's strange
sql.php File Code:
", Str_replace (" "," ", $content)); return $content; }//the input spaces with str_replace ("\ n", "
", Str_replace (" "," ", $content)) is replaced by the format that PHP can accept, and what format is displayed for the input. >
head.php File Code:
textbook.php File Code:
list.php File Code:
ID sequence: |
Title: |
User: |
Content: |
After correcting the "variable undefined" warning, you do not see the phenomenon you said
But you can't rule out a problem in sql.php or head.php.
Variable undefined is not referring to here
Setcookie ("cookie", "out");
changed to Setcookie ("Cookie", "Out", Time ()-3600);
-------------
Setcookie ("Cookie", "OK");
Change to
Setcookie ("Cookie", "OK", Time () +3600);
Setcookie ("cookie", "out");
changed to Setcookie ("Cookie", "Out", Time ()-3600);
-------------
Setcookie ("Cookie", "OK");
Change to
Setcookie ("Cookie", "OK", Time () +3600);
I change or click two times to log in, you can click two times to exit.
Setcookie ("Cookie", "Out", Time ()-3600);
echo "";
}
if ($_post[id]== ' xxx ')
{
$PW =md5 ($_POST[PW]);
if ($PW = = ' e1bfd762321e409cee4ac0b6e841963c ')
{
Setcookie ("Cookie", "OK", Time () +3600);
echo "";
}
}
localhost.href= ' login.php ';
Not supposed to be location.href=?
all localhost should be location