"Parse error: syntax error, unexpected T_STRING in /var/www/site/ftproot/FutureTek/register.php on line 29" is what i get when i open the file in my webbrowser, here is the php code.

<?php

/*****************************************************
* New user registration page. There are links to *
* this page from the header on every otehr page for *
* logged-out and logged-in users. This may be a *
* design flaw however; it's entirely possable that *
* we may want to show this page only to logged out *
* visitors *
*****************************************************/

require_once('includes/registerfuncs.inc');

if ($submit == 'Mail confirmation') {
$feedback = user_register();

// In every case, successful or not, there will be feedback
$feedback_str = "<P class=\"errormess\">$feedback</P>";
} else {
// Show Form for the first time
$feedback_str ='';
}


//-----------------
// DISPLAY THE FORM
//-----------------
include_once('includes/header_footer.php')
site_header('Registration');

//Superglobals don't work with heredoc
$php_self = $_Server;

$reg_str = <<< EOREGSTR
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=CENTER
WIDTH=621>
<TR>
<TD ROWSPAN=10><IMG WIDTH=15 HEIGHT=1
SRC="../images/spacer.gif"></TD>
<TD WIDTH=606></TD>
</TR>
<TR>
<TD>

$feedback_str
<P CLASS="left"><B>REGISTER</B><BR>
Fill out this form and a confirmation email will be sent to you. Once you click on the link in the email your account will be confirmed and you can begin to contribute to the community.</P>
<FORM ACTION="php_self" METHOD="POST">
<P CLASS="bold">First Name<BR>
<INPUT TYPE="TEXT" NAME="first_name" VALUE="$first_name"
SIZE="20" MAXLENGTH="25"></P>
<P CLASS="bold">Last Name<BR>
<INPUT TYPE="TEXT" NAME="last_name" VALUE="$last_name" SIZE="20" MAXLENGTH="25"></P>
<P CLASS="bold">Username<BR>
<INPUT TYPE="TEXT" NAME="user_name" VALUE="$user_name" SIZE="10" MAXLENGTH="25"></P>
<P CLASS="bold">Password<BR>
<INPUT TYPE="password" NAME="password1" VALUE="" SIZE="10"
MAXLENGTH="25"</P>
<P CLASS="left"><B>Password</B> (again)>BR>
<INPUT TYPE="password" NAME="password2" VALUE="" SIZE="10"
MAXLENGTH="25"</P>
<P CLASS="left"<B>Email</B> (required for confirmation)<BR>
<INPUT TYPE="TEXT" NAME="email" VALUE="$email" SIZE="30"
MAXLENGTH="50">
</P>
</form>

</TD>
</TR>
</TABLE>
EOREGSTR;
echo $reg_str;

site_footer();

?>


Please if any one can help I would be in your debt, this is straigh out of a book that i own, PHP and MySQL Bible

Mitch

A parse error usually means that you used the wrong syntax in your code, or typed something wrong..

In your case you forgot the ; after include_once('includes/header_footer.php')

It should be:

include_once('includes/header_footer.php');

On line 28.

PHP will give you the number where the parsing of failed. This usually isn't the line number where your typo is, its usually a line before the parsing failed.

Unless you know how the PHP engine does its parsing, its hard to figure where the parse error is. So you'll have to start on the line indicated, and go backwards till you find it.

How I do it is comment out each line and see which one relieves the error.. That would be the offending line...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.