Need some quick help!
| From: | Alex Behrens | Date: | Sat, 28 Oct 2000 20:38:16 +0000 |
| Subject: | Need some quick help! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22491@lists.php.net to get a copy of this message | ||
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