All pastes #97727 Raw Edit

Stuff

public text v1 · immutable
#97727 ·published 2006-07-24 00:48 UTC
rendered paste body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<title></title>
<style type="text/css">
body {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10px;
background-color: #333333;
color: #FFFFFF;
}

div.all {
margin: auto;
text-align: center;
width: 500px;
}

div.box {
padding: 15px;
width: 500px;
border: 1px solid #222222;
color: #FFFFFF;
text-align: left;
background-color: #444444;
}

label {
color: #FFFFFF;
}

a:link {
text-decoration: underline;
color: #FFFFFF;
}

a:visited {
text-decoration: underline;
color: #CCCCCC;
}

a:active {
text-decoration: underline;
color: #CCCC33;
}

a:hover {
text-decoration: underline;
color: #FFFF00;
}

</style>
	</head>
	<body>
<div class="all">
<div class="box">
<?php
$submit = $_GET['submit'];
$name = $_GET['name'];
$email = $_GET['email'];
$site = $_GET['site'];
$message = $_GET['message'];
if ($submit == "Submit!") {
// CONNECT TO DATABASE
// ADD ENTRY TO TABLE
echo "$submit == Submit!";

	if ($name == "") {
		echo "Please <a href=\"#\">go back</a> and enter your name.";
	} elseif {$email == "") {
		echo "Please <a href=\"#\">go back</a> and enter your email.";
	} elseif {$message == "") {
		echo "Please <a href=\"#\">go back</a> and enter your message.";
	} else {
		echo "<h2>Your entry has been added to the guestbook!</h2> \n\r";
		echo "<h4>Thank you!</h4> \n\r";
		echo "<a href=\"gb1.php\">View the GuestBook entries.</a> \n\r";
	}
	
} else {

echo "<table style=\"text-align:center;\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\" align=\"center\"> \n\r";
echo "<tr><td colspan=\"2\"><h2>Add an Entry to the GuestBook:</h2></td></tr> \n\r";
echo "<form action=\"gb2.php\" method=\"get\" name=\"gb\"> \n\r";
echo "<tr><td style=\"text-align:right;\"><label for=\"name\" title=\"yourname\">Your Name:</label></td> <td style=\"text-align:left;\"><input type=\"text\" name=\"name\" size=\"23\"> </td></tr> \n\r";
echo "<tr><td style=\"text-align:right;\"><label for=\"name\" title=\"email\">Your eMail Address:</label></td> <td style=\"text-align:left;\"><input type=\"text\" name=\"email\" size=\"23\"> </td></tr> \n\r";
echo "<tr><td style=\"text-align:right;\"><label for=\"name\" title=\"yoursite\">Your HomePage:</label></td> <td style=\"text-align:left;\"><input type=\"text\" name=\"site\" size=\"23\"> </td></tr> \n\r";
echo "<tr><td style=\"text-align:right;\"><label for=\"name\" title=\"yourmessage\">Your Message:</label></td> <td style=\"text-align:left;\"><textarea cols=\"20\" name=\"message\" rows=\"7\"></textarea> </td></tr> \n\r";
echo "<tr><td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Submit!\" class=\"button\"> </td></tr> \n\r";
echo "</form> \n\r";
echo "</table> \n\r";
}
?>
<a href="gb1.php">Test Linkage! BOOBS!</a>
</div>
</div>
	</body>
</html>