Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Submit button in Safari? 1

Status
Not open for further replies.

webdev007

Programmer
Sep 9, 2005
168
0
0
Hello,
I could not figure why this works in IE and FF but not in Safari

there is no query error, the DD box feature the query results, this is a small segment of a long script
but not only the submit button is not dislplaid but the rest of the script is stopped (Which could be expected)

However if I comment the <select name=\"city\"> line then the rest of the script is executed
I tried a zillion variances but no luck!
(For test purpose I hard coded the $state value)
<?
echo <<< POST
<form action="by_state.php" method="post">
POST;

$conn=db_connect();

$state="ak";
$query = "
SELECT DISTINCT city
FROM travelospitality
WHERE state = '$state'
ORDER BY 'city' ASC"; //echo"$query";
$result= mysql_query($query);
$num=mysql_num_rows($result);
$i=0;

echo '<select name=\"city\">';

while ($i <$num)
{
echo '<option>';
$city=mysql_result($result,$i,"city");
echo"$city";
$i++;
}
echo <<< SUBMIT
<input type="submit"></form></body></html>
SUBMIT;
?>
 
you have to close the select element first.
 
jpadie,
you won't believe for how long I overlooked that
always call for a second pair of eyes
thanks again
 
Hi

There is no need for zillion of variances neither for a second pair of eyes. If you have rendering problem with an HTML document, ask a validator :
[ul]
[li]W3C Markup Validation Service - online[/li]
[li]HTML Tidy - desktop[/li]
[li]Html Validator - FireFox extension[/li]
[/ul]
Any of those can tell you faster than a human where the markup errors are in your document.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top