28rain Posted February 19, 2009 Share Posted February 19, 2009 Im using nearlyfreespeech.net and when i try and parse a .php file in my ftp url I dont think it parses This is the script; <? if((!$_POST['table_name']) || (!$_POST['num_fields'])) { header( "Location: show_createtable.html"); exit; } $form_block ="<FORM METHOD=\"POST\" ACTION=\"do_createtable.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>"; 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>"; } $form_block .= " <TR> <TD ALIGN=CENTER COLSPAN =3><INPUT TYPE= \"submit\" VALUE =\"Create Table\"></TD> </TR> </TABLE> </FORM>"; ?> <html> <head> <title>Create a database table:Step 2</title> </head> <body> <h1>Define fields for; <? echo "$_POST[table_name]"; ?></h1> <? echo "$form_block"; ?> </body> </html> and my outcome looks like this with just one set of input boxes showing; "; for ($i = 0; $i <$_POST['num_fields']; $i++) { $form_block .= " "; } $form_block .= " FIELD NAME FIELD TYPE FIELD LENGTH "; ?> Define fields for; The host uses apache cgi and php 5.0 and my mysql database has been set up Link to comment https://forums.phpfreaks.com/topic/145902-server-not-parsing-my-php/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 19, 2009 Share Posted February 19, 2009 Only use full php tags - <?php and <?php echo Link to comment https://forums.phpfreaks.com/topic/145902-server-not-parsing-my-php/#findComment-766021 Share on other sites More sharing options...
28rain Posted February 19, 2009 Author Share Posted February 19, 2009 It hasnt made any difference..... Link to comment https://forums.phpfreaks.com/topic/145902-server-not-parsing-my-php/#findComment-766025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.