jeff5656 Posted December 17, 2008 Share Posted December 17, 2008 I get Parse error: syntax error, unexpected $end in C:\wamp\www\warren\billing\editdos.php on line 210 Did I not include a bracket or somehting? I can't figure out why this doesn't work. <td> <?php $query2 = "SELECT * FROM proc_list"; $results2 = mysql_query ($query2) or die (mysql_error()); ?> <select name = "procedure" > <option selected="">Select Procedure <?php while ($row2 = mysql_fetch_assoc ($results2)) { ?><option value = "<?php echo $row2['procedures'];?>"><?php echo $row2['procedures'];?> } </select> </td></tr> Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/ Share on other sites More sharing options...
trq Posted December 17, 2008 Share Posted December 17, 2008 You have brace just after this line... ?><option value = "<?php echo $row2['procedures'];?>"><?php echo $row2['procedures'];?> It doesn't appear to be within php though so shouldn't generate a parse error. Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/#findComment-717843 Share on other sites More sharing options...
Maq Posted December 17, 2008 Share Posted December 17, 2008 Shouldn't you close your option tags? Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/#findComment-717846 Share on other sites More sharing options...
jeff5656 Posted December 17, 2008 Author Share Posted December 17, 2008 ou have brace just after this line... Oops your right thanks! Shouldn't you close your option tags? </option> I never have and it seems to work. Otherwise I have to write </option> over and over Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/#findComment-717847 Share on other sites More sharing options...
Lamez Posted December 17, 2008 Share Posted December 17, 2008 ou have brace just after this line... Oops your right thanks! Shouldn't you close your option tags? </option> I never have and it seems to work. Otherwise I have to write </option> over and over Its good programming habits. You always close an open tag. Its like leaving your front door open, once you are in then you close the door. So close your tags! Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/#findComment-717857 Share on other sites More sharing options...
Maq Posted December 17, 2008 Share Posted December 17, 2008 ou have brace just after this line... Oops your right thanks! Shouldn't you close your option tags? I never have and it seems to work. Otherwise I have to write over and over It may not be the cause of the error but, like Lamez said, it's good programming practice. I don't think it will validate either. Link to comment https://forums.phpfreaks.com/topic/137384-solved-unexpected-end/#findComment-717866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.