Home > Backend Development > PHP Tutorial > An example of a text guestbook made in PHP (2)_PHP Tutorial

An example of a text guestbook made in PHP (2)_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 16:06:03
Original
873 people have browsed it

Last time we studied the guest.php file. Specific questions also require readers to practice them in depth by themselves, and some reference books are needed to learn. If you have no knowledge of PHP, the author advises you not to think about it. The author does not have much time and space to explore the purpose and meaning of a php file sentence by sentence. Okay, let's edit the file edit.php next.
-----------
//edit.php

if ($Submit)
{
if ($SavePassword=="on")
{setcookie("TxtPassword", "$TxtPassword",time()+30*24*3600);}
else
{setcookie("TxtPassword");}
}
?>





Modify message
require ("sys.php");
function readvalue($tags,$tage)
{
global $message,$long,$reply;
$StrStart=strlen(strstr($message, $tags))-strlen($tags);//The starting position of the string where the variable is after removing the tag.
$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 = " ";
$time = date(Y year m month d day H hour i minute);
$ip= $REMOTE_ADDR;
$TxtReply=StripSlashes($TxtReply);
$TxtContent=StripSlashes($TxtContent);
$TxtContent=htmlspecialchars($TxtContent);
$TxtContent=check_strlen_long($TxtContent) ;
$TxtContent=nl2br($TxtContent);
$Wcontent = "Message content:
< !--content>$TxtContent

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Why does it still jump after returning false?
From 1970-01-01 08:00:00
0
0
0
Optimize table indexes in MySQL
From 1970-01-01 08:00:00
0
0
0
Why can't I install it?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template