m month d day H:i:s A"); $ip=$REMOTE_ADDR;//The message ip address $name=trim($name); $email=trim($email); $title= strip_tags($top); $nnote=nl2br(strip_tags($content));//Remove the html tag first, and then convert the line breaks to .N if (! $ Name ||! $ Email ||! $ Title ||! $ Nnote) {// Check whether to fill in the complete ECHO "Sorry, you must fill in all the content! >Return"; exit; }elseif(!ereg('^[-!#$%&'*+./0-9=?A-Z^_`a-z{|}~]+' .'@'.'[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+.'.'[-!#$%&'*+./0 -9 =? A-Z^_`a-Z {|} ~]+$ ', $ email) // email legitimacy verification ) { echo "email!" "; exit; exit } //Write to database $sql="INSERT INTO notebook (name,email,time,face,ip,title,nnote) VALUES ('$name','$ email','$time','$face','$ip','$title','$nnote')"; $result = mysql_query($sql,$db); mysql_close($db); echo "Message successfully!"; } ?>
|