wobuck Posted November 24, 2010 Share Posted November 24, 2010 The following html code works in IE & Firefox but the PHP code only works in IE Any help appreciated. <html> <body> <select size="1" name="place"> <option value=" ">Select</option> <option value="1st">1st</option> <option value="2nd">2nd</option> <option value="3rd">3rd</option> <option value="4th">4th</option> <option value="5th">5th</option> </select> </body> </html> <?php print("<td><select size=\"60px\" name=\"place\">"); print("<option value=\" \">Select</option>"); print("<option value=\"1st\">1st</option>"); print("<option value=\"2nd\">2nd</option>"); print("<option value=\"3rd\">3rd</option>"); print("<option value=\"4th\">4th</option>"); print("<option value=\"5th\">5th</option>"); print("</select></td>"); ?> Link to comment https://forums.phpfreaks.com/topic/219680-php-drop-down-not-working-in-firefoxchrome/ Share on other sites More sharing options...
kenrbnsn Posted November 24, 2010 Share Posted November 24, 2010 You're generating bad HTML with the PHP code. In the line <?php print("<td><select size=\"60px\" name=\"place\">"); ?> The value of 60px is incorrect in a select tag. Ken Link to comment https://forums.phpfreaks.com/topic/219680-php-drop-down-not-working-in-firefoxchrome/#findComment-1138905 Share on other sites More sharing options...
wobuck Posted November 24, 2010 Author Share Posted November 24, 2010 Too many formatting issues for lots of other lines led me to this! Many thanks Link to comment https://forums.phpfreaks.com/topic/219680-php-drop-down-not-working-in-firefoxchrome/#findComment-1138909 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.