/******************************************** * Simple PHP Guestbook * * by Justin * * Version 1.0 * * 2003-Feb-01 * * Works with PHP version 4.1.0 and higher * ********************************************/
/******************************************** * CHANGE THIS to the file you want * * to store all the info in. * * Make sure the file exists * * and is CHMODed to 777 * *********************************************/
$file='./g.txt';
/******************************************** * you don't need to edit anything below here ********************************************/
error_reporting(1); $mode=$_GET['mode']; if($mode!='view' && $mode!='sign') $mode=$_POST['mode']; if($mode!='view' && $mode!='sign') $mode='sign'; $name=$_POST['name']; $site=$_POST['site']; $comments=$_POST['comments']; $date=date('l, F dS, Y (g:i A T)'); $self=$_SERVER['PHP_SELF'];
($handle=fopen($file,'a+') or die("Could not open file: $file"));
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.