R: [PHP] Need some quick help!
| From: | (Delbono) | Date: | Sat, 28 Oct 2000 21:28:50 +0000 |
| Subject: | R: [PHP] Need some quick help! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22495@lists.php.net to get a copy of this message | ||
Don't give the web output, give the hole html output instead, ...
Possible problems are:
Did you check the content of the db?
MAybe you get two records, one of which is empty. (so--> no Name and no
Author)
-----Messaggio originale-----
Da: Alex Behrens <bigal@3d-unlimited.com>
A: php-general@lists.php.net <php-general@lists.php.net>
Data: sabato 28 ottobre 2000 22.56
Oggetto: [PHP] Need some quick help!
>Hey Guys,
>
>I'm pretty new to php and mysql but I need some quick help, I'm making a
>very, very easy script that outputs review names and urls from a database.
I
>got it to work but for some reason it says:
>
>Name (Written By: Author) (Written By: )
>
>I can't figure out why it repeats the Written By line without the author,
>here is the code I'm using:
>
><?php
>$db = mysql_connect("localhost", "", "");
>mysql_select_db("networkarticles",$db);
>$r = mysql_query("SELECT * FROM hwureviews");
>while($a=mysql_fetch_array($r)) {
>printf("<a href=\"%s\">%s</a> (Written by: <a
>href=\"mailto:%s\">%s</a>\n)",$a["url"],$a["name"],$a["email"],$a["author"]
)
>;
>}
>?>
>
>Any help is greatly appreciated!
>
>Thanks!
>--------------------------------------------
>-Alex "Big Al" Behrens
>E-mail: bigal@3d-unlimited.com
>Phone: 651-482-8779
>Fax: 651-482-1391
>Pager: 612-740-2162
>ICQ: 3969599
>Owner of the 3D-Unlimited Network:
>http://www.3d-unlimited.com
>Send News:
>news@3d-unlimited.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>