PHP-MySQL?!
| From: | Bsantos PHP | Date: | Mon, 09 Dec 2002 10:40:41 +0000 |
| Subject: | PHP-MySQL?! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-127471@lists.php.net to get a copy of this message | ||
Hello people:
I'm building a Site which contains this:
<?
echo"
<form method=\"POST\" action=\"pesquisar.php\">
<select name=\"esp\">
<option value=\"Escolha uma espécie\">Escolha uma espécie</option>
<option
value=\"-------------------------------\">------------------------------</op
tion>
";
$db = mysql_connect("localhost","user","pass");
mysql_select_db("listing");
$list = mysql_query("SELECT nome FROM listagem");
while ($list_especies = mysql_fetch_row($list)) {
for ($i=0;$i<1;$i++) {
echo "
<option value=\"$list_especies[$i]\">$list_especies[$i]</option>
";
}
}
echo"</select></form>";
mysql_close($db);
?>
where:
localhost -> it's my server name
user -> my mysql username
pass -> my mysql password
listing -> my table, which contains one only column, with more than 3877
lines (named nome).
Problem is, when I try to execute the .PHP page with this stuff, it keeps
blinking until it tells me that the page could not be found.
NOTE: If I use in the query: "... LIMIT 1000", it show the 1000 lines with
no problem.
Thanks people,
bsantos