Okay so ive been working on this website and i made a register forum but when i ftp it and then go to test it out i get an error. ive done it exactly like in the video tutorial and it does not work for me.
heres the line of code to where its says im getting the error:
$form = <form action='register.php' method='post'>
and the error is :
Parse error: syntax error, unexpected '<' in /home/a3888506/public_html/register.php on line 7
Thanks for any help in advance,
Dominic
Php syntax error,
Moderator: General Moderators
- flying_circus
- Forum Regular
- Posts: 732
- Joined: Wed Mar 05, 2008 10:23 pm
- Location: Sunriver, OR
Re: Php syntax error,
That's because there is a syntax error. I would assume that you want to set the $form variable to the following string. You need to wrap it in quotes, so it is treated as a string, otherwise the < symbol is treated as a comparisson operator and dies.
Code: Select all
$form = "<form action='register.php' method='post'>";-
dominic600
- Forum Newbie
- Posts: 2
- Joined: Fri Aug 05, 2011 6:32 pm
Re: Php syntax error,
yes, i have done that. when i do that i get this :
Parse error: syntax error, unexpected '<' in /home/a3888506/public_html/register.php on line 8
and line 8 reads:
<table>
Parse error: syntax error, unexpected '<' in /home/a3888506/public_html/register.php on line 8
and line 8 reads:
<table>
Re: Php syntax error,
It's the same issue as you had before. You can't simply place <table> in your php code when <table> is html code. Either put it in a variable like you did with the form or use it as HTML code.