<?php
include_once('guestbook.class.php');
$guestbookUser = new guestbookUser();
if(isset($_REQUEST['submit'])){
$guestbookUser->name = $_REQUEST['name'];
$guestbookUser->text = $_REQUEST['text'];
$guestbookUser->imgURL = $_REQUEST['image'];
$guestbookUser->email = $_REQUEST['email'];
$guestbookUser->headline = $_REQUEST['headline'];
$guestbookUser->createBlogEntry();
header ('location: guestbook.php?accept=1');
}
?>
<form action="guestbook.php" method="post">
image :
<select name="image" style="width:200px">
<option value="user.jpg"> -- </option>
<option value="image1.jpg"> Image 1 </option>
<option value="image2.jpg"> Image 2 </option>
</select>
<br />
Headline: <input type="text" name="headline" style="width:200px" /><br />
Name: <input type="text" name="name" style="width:200px" /><br />
Email: <input type="text" name="email" style="width:200px" /><br />
<textarea name="text" style="width:400px;height:150px;"></textarea><br />
<input type="submit" name="submit" value="Submit" />
</form>
<?php
if(isset($_REQUEST['accept'])){
echo "An e-mail has been send to your e-mail, please read it to verify your entry.<br />";
}
echo $guestbookUser->displayResults($guestbookUser->readAllguestbook());
?>
|