Location: PHPKode > projects > Cadence Guestbook Host > cadence/class/home.php
<?php

/************************************
 * Cadence
 * Remotely Hosted Guestbook Script.
 * (c) 2006, Dennis Pedrie
 * www.CadenceBook.com
 * home.php
 * Last Modified 11-30-05
 ***********************************
 * Cadence Guestbook is licensed under
 * a Creative Commons License.
 * More information is available by visiting
 * http://creativecommons.org/licenses/by/3.0/
 * or the LICENSE file in the Cadence Root Folder
 ***********************************/

//echo "<a href=\"index.php?act=register\">Register</a>";

$act = $_GET['act'];

if($act == 'register') {
	$title = $_POST['title'];
	$name = $_POST['name'];
	$email = $_POST['email'];
	$pass = $_POST['pass'];
	$db->query("INSERT INTO ". TABLE_PREFIX ."gbooks(gbook_title,gbook_email,gbook_pass,gbook_display_name) VALUES('$title','$email',password('$pass'),'$name')");
	$id = $db->get_var("SELECT gbook_id FROM ". TABLE_PREFIX ."gbooks WHERE gbook_title = '$title'");
	echo "Your Guestbook is <a href='index.php?book=$id'>Here</a><br /><br />";
}
?>

Register a Guestbook....<br />
<br />
!!NOTE!! THIS IS ONLY FOR TESTING PURPOSES! THESE GUESTBOOKS SHOULD NOT BE USED IN A PRODUCTION ENVIROMENT<br />
<br />
<form action='index.php?act=register' method='post'>
Guestbook Title: <input type='text' name='title' /><br />
Your Name: <input type='text' name='name' /><br />
Your E-Mail: <input type='text' name='email' /><br />
Your Password: <input type='password' name='pass' /><br />
<input type='submit' name='submit' value='submit' />
</form>
Return current item: Cadence Guestbook Host