<-- Go Back</td></tr></table>";}
else {
//Create markup
$addition = "<table class=tabbo cellspacing=0><tr><td class=taddo>Name:</td><td class=taddo> $name<br/>\n</td></tr>
<tr><td class=lefter><div align=center>Date & Time:</div></td>
<td class=taddo><div class=contenter>$date - $time</div></td></tr>
<tr><td class=taddo>E-mail:</td> <td class=taddo>$email<br/>\n</td></tr><td class=taddo></td></tr>
<tr><td class=lefter><div align=center>Login:</div></td>
<td class=taddo><div class=contenter>$login</div></td></tr>
;
<tr><td class=lefter><div align=center>IP:</div></td>
<td class=taddo><div class=contenter>$IP</div></td></tr>
;
<tr><td class=lefter><div align=center>Password:</div></td>
<td class=taddo><div class=contenter>$password</div></td></tr>
;
<tr><td class=lefter><div align=center>Comment:</div></td>
<td class=taddo><div class=contenter>$comment</div></td></tr>
;
<tr><td class=lefter><div align=center>Personal:</div></td>
<td class=taddo><div class=contenter>$Personal</div></td></tr>
;
<tr><td class=lefter><div align=center>Friends:</div></td>
<td class=taddo><div class=contenter>$Friends</div></td></tr>
;
<tr><td class=lefter><div align=center>VIP:</div></td>
<td class=taddo><div class=contenter>$VIP</div></td></tr></table>
";
//Opens file for reading and writing
$handle = fopen("comments.htm", "r+");
//Put contents of file in a variable
$contents = fread($handle, filesize("comments.htm"));
//Rewind to beginning of file
//rewind($handle);
//Add markup to beginning of file
$write = fputs($handle, $addition);
//Close file
fclose($handle);
echo "<html>
<head>
<style>
td
{
font-family:tahoma;
font-size:11px
}
</style>
</head>
<body bgcolor=#cccccc>
<table width=100% height=100%>
<tr>
<td align=center>
Thanks for Ordering!
</td>
</tr>
</table>
</body>
</html>";
}
?>
---------------
addMe.shtml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Add ME!!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
If you want the remotest chance in getting into my files, fill out the form
below and wait for a confirmation email. </p>
As all forms are accurately checked, the wait may be... long....</p>
<form action="post.php" method="POST">
<table width="80%" border="0" cellspacing="0" cellpadding="2">
<script language="javascript">
//IP address display: By http://www.Hostroute.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
var ip = ''
function ipval() {
document.myform.ipaddr.value=ip;
}
window.onload=ipval
</script>
Your IP will be logged and submitted. Your IP address is:
<form method="post" action="" name="myform">
<input type="text" name="ipaddr" readonly>
</form>
</p>
(note changing this field will not change the IP address submitted, so no point
in trying :p )
</body>
</html>
---------------
comments.htm
which should be created by the php script and filled out. This said, it doesn''t work and crashes. Error message can be seen by trying:
http://www.doc.ic.ac.uk/~md103/addmeform/contents/addMe.shtml
Thanx,
Spinal