Popup menu problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



G'day all,

I've struck a problem with an existing piece of code which I want to move
to a new one. I'm aware of the issues with register global being off as far
as forms are concerned, but I can't figure out why this snippet doesn't
work.  It displays the code rather than the popups.

<?php
$db_name = "torch";
$table_name = "stories"

$connection = @mysql_connect("localhost","user","paswword") or die("Couldn't
Connect.");
$db = @mysql_select_db($db_name, $connection) or die("Couldn't select
database.");

$getlist = mysql_query("SELECT distinct Writer FROM stories order by
Writer");
echo " <select name=\"WriterName\">\n";
echo " <option>\n";
while ($row = mysql_fetch_array($getlist)) {
echo ' <option value="'.$row["Writer"].'">'.$row["Writer"]."</option>\n";
}
echo " </select>\n";
?>


As I said, it works fine on our current web server  (apache 1.3x with a
similar vintage PHP and MySQL) but I have built the new server with Apache
2.0.47, MySQL 4 and PHP 4.3.2 (on MacOSX 10.2.6).  I've pretty much ruled
out MySQL because the query returns the correct result when run from the
CLI.

I have another couple of pages which use hard coded popups and they work
fine. PHP seems fine as I can display phpinfo() without problem.

Any help, as always, would be greatly appreciated.

cheers

kim


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux