<?
$link = mysql_connect("localhost", "", "")
or die ("Could not connect");
mysql_select_db ("guestbook")
or die ("Could not select database");
$guestname = stripslashes(str_replace("'","''",$guestname));
$comment = stripslashes(str_replace("'","''",$comment ));
$query = "insert into guestsign set name='$guestname',comment='$comment'";
mysql_query ($query) or die ("Query failed: $query<br>" . mysql_error());
?>
Thank you for signing my guestbook !!!
|