|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
listing email and name problem
I have the following code. Its not mine but it should work. what it should do is list the email adresses and names from an database. but it lists just the names. the strange thing is, that it already worked and now I cant find a way get it right.
Code:
<?
$link = mysql_connect("", "");
mysql_select_db("chobo4ever2_de_db",$link);
$Result = mysql_query("SELECT * FROM ltw_email",$link);
echo "<table border=1>";
echo "<tr><td><b>Name</b></td><td><b>Email</b></tr>";
while ($Row = mysql_fetch_row($Result))
{
printf ("<tr><td>%s %s</td><td>%s</td></tr>",
$Row[1], $Row[2], $Row[3]);
}
echo "</table>";
?>
thx in advance |
|
#2
|
|||
|
|||
|
RE: listing email and name problem
I don't see anything wrong with the code. Try that query :
SELECT * FROM ltw_email directly against the database and make sure you get emails back from that..... |
|
#3
|
|||
|
|||
|
RE: listing email and name problem
try print_r'ing $Row and check what gets returned, i don't personally trust mysql_fetch_row.. use mysql_fetch_assoc if you can..
And yeah, check what results "SELECT * FROM ltw_email" gives you.. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > listing email and name problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|