I just started learning php (as the current mainstream development language) , but I compiled a message board program and felt good about myself, so I posted it shamelessly and asked for your corrections. The source program is as follows:
(as the current mainstream development language)
//File name: guest.php(as the current mainstream development language)
//Setting section
$guestfile="guest";//Text file to record comments
$home="index.html";//Returned homepage
$imagedir= "image"; //Directory of image files
$backimage=$imagedir."/bk.gif";//Background image
$backcolor="#ceffff";//Background color, in $backimage= It works when "" if($QUERY_STRING!="") {
$page = $QUERY_STRING;
} else {
$page = 1;
} if($mode=="add") { $name=htmlspecialchars(trim($name));
$title=htmlspecialchars(trim($title));
$data=nl2br(htmlspecialchars($data));
$ data=str_replace("r","",$data);
$data=str_replace("x0A","",$data);
$data=str_replace(" "," ", $data);
if($data=="") $data=" ";
$e_mail=trim($e_mail);
if($e_mail=="") $e_mail=0 ;
$url=trim($url);
if($url=="http://" || $url=="") $url=0;
$time=date( "Y")."Year".date("m")."Month".date("d")."Day[".date("H").":".date("i"). ":".date("s")."]";
if($name=="" || $title==""){
echo "