Last time we studied guest. PHP file. the specific problem also requires readers and friends to practice it in depth, and requires some tool books to learn. If you have no knowledge of php, I advise you not to read it, I don't have much time and space to explore the usage and significance of a PHP file one by one. okay. Now let's edit. php file.
-----------
// Edit. php
<?
If ($ Submit)
{
If ($ SavePassWord = "on ")
{Setcookie ("TxtPassword", "$ TxtPassword", time () + 30*24*3600 );}
Else
{Setcookie ("TxtPassword ");}
}
?>
<Html>
<Style type = text/CSS>
Td {FONT-SIZE: 10pt ;}
TEXTAREA
{
FONT-FAMILY: "";
FONT-SIZE: 10pt;
}
</Style>
<Head>
<Meta http-equiv = "Content-Language" content = "zh-cn">
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> modify message </title>
<?
Require ("sys. php ");
Function readvalue ($ tags, $ tage)
{
Global $ message, $ long, $ reply;
$ StrStart = strlen (strstr ($ message, $ tags)-strlen ($ tags); // remove the starting position of the string where the variable is located.
$ StrEnd = strlen (strstr ($ message, $ tage ));
$ Len = $ StrStart-$ StrEnd;
$ StrStart = $ long-$ StrStart; // start character.
$ StrString = substr ($ message, $ StrStart, $ len );
Return $ StrString;
}
Function save ($ record)
{
Global $ TxtContent, $ TxtEmail, $ TxtHomepage, $ TxtEmail, $ TxtName, $ TxtFrom, $ TxtReply, $ REMOTE_ADDR, $ guestfile;
$ Content = file ($ guestfile, "r ");
$ Space = "& nbsp ;";
$ Time = date (Y, m, D, H, I );
$ Ip = $ REMOTE_ADDR;
$ TxtReply = StripSlashes ($ TxtReply );
$ TxtContent = StripSlashes ($ TxtContent );
$ TxtContent = htmlspecialchars ($ TxtContent );
$ TxtContent = check_strlen_long ($ TxtContent );
$ TxtContent = nl2br ($ TxtContent );
$ Wcontent = "<tr> <td> <font color = # AB00E1> message content: </font> <br> <! -- Content> $ TxtContent <! -- Endcontent> ";
$ Wcontent = $ Wcontent. "<br> <font color = # 6633FF> name of the speaker: </font> <! -- Name> $ TxtName <! -- Endname> ";
If ($ TxtEmail! = "")
{$ Wcontent = $ Wcontent. "<br> <font color = # 9900CC> email box </font> <a href ="