nice forum-- i could use some help please-- i am building a little poetry site for a buddy, and tried to add a comments script onto it to allow people to leave/view comments-- i get the following error when trying to access the first page i put the script on:
Parse error: syntax error, unexpected '<' in /home/shatter/public_html/newtest.php on line 204
now-- here is the code for the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<title>a bit modern</title>
<!-- I linked to the stylesheet using two methods, the @import method as well as the link rel method, to ensure maximum accessibility -->
<style media="all" type="text/css">
<!--
@import url(styles5.css);
-->
</style>
<link media="all" href="styles5.css" type="text/css" rel="stylesheet" />
<?php $page_id ="testpage";
include('http://www.shatteredheartspoetry.com/comments_manager/form.php');
include('http://www.shatteredheartspoetry.com/comments_manager/view.php');
?>
</head>
<body>
<div id="wrap"><!-- start of container -->
<div id="header">"Torn Between Two"</div>
<div id="content"><!-- left column, contains navigation and photos -->
<div id="column1">
<div id="nav">
<ul>
<li><a accesskey="o" href="index.html">Home</a></li>
<li><a accesskey="a" href="about.html">About
Allen</a></li>
<li><a accesskey="p" href="portfolio.html">Portfolio</a>
</li>
<li><a accesskey="h" href="publications.html">Publications</a></li>
<li><a accesskey="r" href="custom.html">Personalized
Poetry</a></li>
<li><a accesskey="c" href="comment.html">Guestbook</a></li>
<li><a accesskey="ff" href="/forum">Forum</a></li>
</ul>
</div>
<img alt="Picture" src="Images/camera1.gif" style="width: 108px; height: 60px;" /> <img alt="Picture" src="Images/camera2test.jpg" style="width: 108px; height: 60px;" />
<img src="Images/bars1.jpg" style="width: 108px; height: 109px;" /></div>
<!-- end of left column --><!-- right column, this is the main content area, and where the links are -->
<div id="column2">
<h1>Torn Between Two</h1>
<p></p>
<div style="text-align: center;">I need you with a clear
mind<br />
to make the right decisions<br />
about your heart and mine.<br />
I know you are caught between two,<br />
but only if you knew<br />
how much I'm in love with you...<br />
<br />
Torn Between Two<br />
<br />
I never pulled your hair, or put you down,<br />
or beat you up, or threw you to the ground;<br />
that's not what real men do<br />
to the love of their life,<br />
I just want you to be my wife...<br />
<br />
Torn Between Two<br />
<br />
Will you give us a chance<br />
or will you rip us apart?<br />
Your torn between two,<br />
one love is real,<br />
and the others may give you the chills...<br />
<br />
Torn Between Two<br />
<br />
I can't make that decision<br />
on who you choose;<br />
but if you like to be abused<br />
and used,<br />
I'm not that dude.<br />
So I will choose for you,<br />
but know I do love you...<br />
<br />
Torn Between Two<br />
<br />
</div>
<h1 style="border-top: medium none; border-right: medium none; border-bottom: medium none; text-align: center;"><a href="sample23.html"><img alt="" src="Images/button2test.jpg" style="border: 0px solid ; width: 165px; height: 23px;" /></a><a href="sample25.html"><img alt="" src="Images/buttonetest.jpg" style="border: 0px solid ; width: 165px; height: 23px;" /></a></h1>
<h1>Comment<?php <!-- Start of Form -->
<div align="center">
<form method="POST" action="post.php?id=<? echo $page_id ?>"
name="myform">
<table style="border-collapse: collapse;" border="0">
<tbody>
<tr>
<td colspan="2" height="3"><b>Comments:</b>
<hr class="thik" /></td>
</tr>
<tr>
<td>Name:</td>
<td><input name="name" class="comments_field" maxlength="30" size="35" type="text" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input class="comments_field" name="email" size="35" type="text" /></td>
</tr>
<tr>
<td colspan="2" height="14">Comments:</td>
</tr>
<tr>
<td colspan="2" height="15"><textarea rows="3" class="comments_field" name="comment" cols="41"></textarea></td>
</tr>
<tr>
<td colspan="2" height="30">
<div align="center"><input value="Post" type="submit" /><input value="Clear" type="reset" /></div>
</td>
</tr>
</tbody>
</table>
<!-- End of Form -->
</h1>
<?php include('settings.php');
if ($page_id=="")
{
echo $format_no_id_view;
}
else
{
$fp = fopen( $view_file,"r"); $data = fread($fp, 80000);
fclose( $fp );
$data_array = split ("$spilter", $data);
$total_post = count($data_array) - 1;
$data_format = "$data<b>Total $total_post comments posted here so far.</b>";
if (total_post =="0")
{
echo $no_post;
}
else
{
echo $data_format;
}
}
?></div>
?>s
<p>Future Area for comments on the above poem</p>
<h1>Gallery</h1>
<p>Coming Soon</p>
<ul>
<li>Coming Soon</li>
<li>Coming Soon</li>
<li>Coming Soon</li>
<li>Coming Soon</li>
<li>Coming Soon</li>
</ul>
<p>Coming Soon</p>
<h1>Some Links</h1>
<div id="links">
<div>
<ul>
<li><a href="/forum">Forum</a></li>
<li><a href="http://www.myspace.com/shatteredheartspoetry">MySpace</a></li>
<li><a href="http://www.urbandictionary.com">Urban
Dictionary</a></li>
<li><a href="http://www.shatteredheartspoetry.com">Home</a></li>
</ul>
</div>
<div>
<ul>
<li><a href="shatteredheartspoetry.blogspot.com">Blog</a></li>
<li><a href="http://www.digitalgangster.com">DG.com</a></li>
<li><a href="http://www.shatteredheartspoetry.com">Home</a></li>
<li><a href="http://www.shatteredheartspoetry.com">Home</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- end of right column -->
<div id="footer">Original design by <a href="mailto:webmaster@shatteredheartspoetry.com">Trey B</a>.
(c)
2005 shatteredhearts ent llc.</div>
</body>
</html>
and i think these are the scripts that run it:
<!-- Start of Form -->
<div align="center">
<form method="POST" action="post.php?id=<? echo $page_id ?>" name="myform">
<table border="0" style="border-collapse: collapse">
<tr>
<td height="3" colspan="2"><b>Comments:</b><hr class="thik"></td>
</tr>
<tr>
<td>Name:</td>
<td><input name="name" type="text" class="comments_field" maxlength="30" size="35"></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" class="comments_field" name="email" size="35"></td>
</tr>
<tr>
<td height="14" colspan="2">Comments:</td>
</tr>
<tr>
<td height="15" colspan="2"><textarea rows="3" class="comments_field" name="comment" cols="41"></textarea></td>
</tr>
<tr>
<td height="30" colspan="2"><div align="center">
<input type="Submit" value="Post" >
<input type="reset" value="Clear">
</div></td>
</tr>
</table>
</form>
<!-- End of Form -->
</div>
and:
<?php
$id = $_GET['id'];
include('settings.php');
// Validate ID
if ($id=="")
{
echo "$format_no_id_post";
}
else
// Form Validation
{
if ($name == "")
{
echo $format_no_name;
}
else if ($email == "")
{
echo $format_no_email;
}
else if (eregi("^[a-zA-Z0-9_.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email))
{
echo $format_inv_email;
}
else if ($comment == "")
{
echo $format_no_cmn;
}
//// If form is valid, contnue processing
else
{
$fp = fopen( $file,"r");
$old_data = fread($fp, 80000);
fclose( $fp );
$write ="$format$spilter$old_data";
$fp = fopen( $file,"w");
if(!$fp) die("<b>Failed to post your comments. Sorry!</b>");
fwrite($fp, $write, 800000);
fclose( $fp );
echo " $format_thanks";
}
}
?>
and:
<?php
include('settings.php');
if ($page_id=="")
{
echo $format_no_id_view;
}
else
{
$fp = fopen( $view_file,"r");
$data = fread($fp, 80000);
fclose( $fp );
$data_array = split ("$spilter", $data);
$total_post = count($data_array) - 1;
$data_format = "$data<b>Total $total_post comments posted here so far.</b>";
if (total_post =="0")
{
echo $no_post;
}
else
{
echo $data_format;
}
}
?>
now-- i got this script off of hotscripts.com i believe-- i added the seciotns they told me to into my normal html file and renamed it .php, then i uploaded the other 3 files to my directory on my host--- can anyone point me in the right direction