Forum Moderators: coopster

Message Too Old, No Replies

parse error, unexpected T VARIABLE, expecting ',' or ';'

         

Ciaroscuro

4:06 am on Nov 1, 2008 (gmt 0)

10+ Year Member



Hopefully, this will be an easy one. I've run into a "parse error, unexpected T_VARIABLE, expecting ',' or ';' in RegistrationForm.php on line 34". I'm not aware of the need for a , or; except at the end of a form where there is one. Here's the code:

31 <body>
32 <?php
33 echo "<p>
34<form action="$_SERVER['PHP_SELF']" method="POST">
35<table width='95%' border='0' cellspacing='0' cellpadding='2'>
36
37<tr><td></td><td>Please fill in all information.</td></tr>
38
39 <tr><td align='right'><b>First Name:</b></td>
40 <td><input type='text' name='$First Name' size='65'
41 maxlength='65' value='First Name'></td></tr>
42
...
96 </table>
97 <input type='hidden' name='submitted' value='yes'>
98</form>
99 </p> ";
100 ?>
101</body>

Would appreciate any correction or suggestion.
Thank you.

cameraman

7:00 am on Nov 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World, Ciaroscuro.

You need to escape these double-quotes:
34<form action=\"$_SERVER['PHP_SELF']\" method=\"POST\">