PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
dinno2
Forum Newbie
Posts: 9 Joined: Sun Aug 11, 2002 10:25 am
Post
by dinno2 » Fri Aug 16, 2002 10:19 am
im sure this sounds dumb, I am trying to pull an email off a DB that just reads email, and not the address, but as an actual email hyperlink, i have tried several different methodes, to some degree of sucess, not not quite.
heres what i have so far
Code: Select all
if ($row = mysql_fetch_array($result)) {
do {
print "<table>";
print "<td class="cell"> $rowї"name"]\n";
print (" ");
print "<a href="mailto:" .'$email'. "">Click here!</a>";
print (" ");
print "<td class="cell"> $rowї"hub"]\n";
print (" ");
print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
include("footer.php");
?>
doesnt seem to work
gotDNS
Forum Contributor
Posts: 217 Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA
Post
by gotDNS » Fri Aug 16, 2002 2:46 pm
That doesn't seem like enough to work with there....eh?
ssand
Forum Commoner
Posts: 72 Joined: Sat Jun 22, 2002 9:25 pm
Location: Iowa
Post
by ssand » Fri Aug 16, 2002 3:01 pm
You could try this:
Code: Select all
if (mysql_num_rows($result))
{
while ($row=mysql_fetch_array($result))
{
print "<table>";
print "<td class="cell"> $rowї"name"]\n";
print (" ");
print "<a href="mailto:" .'$email'. "">Click here!</a>";
print (" ");
print "<td class="cell"> $rowї"hub"]\n";
print (" ");
print ("<p>");
}
}
else {print "Sorry, no records were found!";}
include("footer.php");
?>
Steve
hob_goblin
Forum Regular
Posts: 978 Joined: Sun Apr 28, 2002 9:53 pm
Contact:
Post
by hob_goblin » Fri Aug 16, 2002 3:02 pm
first off change
Code: Select all
print "<a href="mailto:" .'$email'. "">Click here!</a>";
to
Code: Select all
print "<a href="mailto:" .$email. "">Click here!</a>";
variables wont be proccessed if they are encased in single quotes