[PHP-DB] Popup menu problem
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
Re: [PHP-DB] Popup menu problem
Kim Kohen wrote: 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. If you're seeing the PHP source code in the window, then PHP is not configured correctly. Are you calling a file with a .php extension (dumb question, I know, but you never know). There's no difference in calling a PHP file through a popup or through a regular link. The code you showed didn't look wrong, show us how you're calling this code. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Popup menu problem
G'day all I've struck a problem with an existing piece of code which I want to move to a new one. Apologies in advance. The page in question was an HTML page rather than a PHP page and I hadn't added .html to the AddType bit of the httpd.conf file. Thanks to those who replied - it's working now cheers kim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Popup
Como faço para criar uma janela de popup em php? O objectivo é ao abrir uma página com dados estatisticos abrir outra com gráficos. xau __ Rui Palma ICQ#: 171381429 Current ICQ status: + More ways to contact me __