Location: PHPKode > projects > All in one guestbook-shoutbox-chatroom > all-in-one-guestbook-shoutbox-chatroom/commentform.php
<?php 
// start the session 
session_start(); 
header("Cache-control: private"); //IE 6 Fix 
?>
<html>
<head>
<title> Add comment </title>
<script>
<!--
/* clears default values from input boxes */
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
//-->
</script>
<style type="text/css" media="screen"><!--
.inputa { color: maroon; font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif }
--></style>
</head>
<body bgcolor="#003366" leftmargin="2" marginheight="2" marginwidth="2" topmargin=2>
<?
if (! isset($_SESSION['name'])) {
?>
<div class="inputa">
<form action="commentadd.php" method="post">
<input type="text" name="name" value="name" size="14" maxlength="20" onFocus="clearText(this)" class="inputa"><input type="text" name="comment" value="comment" size="50" maxlength="250" onFocus="clearText(this)" class="inputa">
<input type="submit" name="addcomment" value="SayIt" / class="inputa">
</form>
</font></div>
<? } else { ?>
<div class="inputa">
<form action="commentadd.php" method="post">
<input type="text" name="name" value="<? echo($_SESSION['name']); ?> " size="14" maxlength="20" onFocus="clearText(this)" class="inputa"><input type="text" name="comment" value="comment" size="50" maxlength="250" onFocus="clearText(this)" class="inputa">
<input type="submit" name="addcomment" value="SayIt" / class="inputa">
</form>
</font></div>
<? } ?>
</body>
</html>
Return current item: All in one guestbook-shoutbox-chatroom