Ok folks.
I'm a complete newb and doing most of my coding the old cookbook method, but this one has me stumped.
I'm getting the following errorđŸ˜›arse error: parse error, unexpected '<' in /home/yadayada.php on line 16
And here's the Code:
<?
//get values from form page 1 and test
if ((!$_POST[table_name]) || (!$_POST[num_fields])) {
header( "Location: [url]http://www.traciedux.com/NewDB.html[/url]");
exit;
}
//Start creating form for display
$form_block = "
<FORM METHOD=\"POST\" ACTION=\"tablecreater.php\">
<INPUT TYPE=\"hidden\" NAME=\"table_name\" VALUE=\"$_POST[table_name]\">
<TABLE CELLSPACING=5 CELLPADDING=5>
<TR>
<TH>FIELD NAME</TH>
<TH>FIELD TYPE</TH>
<TH>FIELD LENGTH</TH>
</TR> /*this is line 16*/
";
//Count from 0 until you reach the number of fields
for ($i = 0; $i < $_POST[num_fields]; $i++) {
$form_block .= "
<TR>
<TD ALIGN=CENTER> <INPUT TYPE=\"text\" NAME=\"field_name[]\" SIZE=\"30"> </TD>
<TD ALIGN=CENTER>
<SELECT NAME=\"field_type[]\">
<OPTION VALUE=\"char\">char</OPTION>
<OPTION VALUE=\"date\">date</OPTION>
<OPTION VALUE=\"float\">float</OPTION>
<OPTION VALUE=\"int\">int</OPTION>
<OPTION VALUE=\"text\">text</OPTION>
<OPTION VALUE=\"varchar\">varchar</OPTION>
</SELECT>
</TD>
<TD ALIGN=CENTER><INPUT TYPE=\"text\" NAME=\"field_length[]\" SIZE=\"5\"></TD>
<\TR>";
}
/*Finish the form*/
$form_block .= "
<TR>
<TD ALIGN=CENTER COLSPAN=3><INPUT TYPE=\"submit\" VALUE=\"Create Table\"></TD>
</TR>
</TABLE>
</FORM>";
?>
After this is the HTML (which I didn't think would help.)
Any advice with why I'm getting a parse error on something that (to my pupae eyes) looks correct would be met with much thanks.
Additionaly - all coding advice will be taken to heart.
Duxie