eivfur Posted August 2, 2003 Share Posted August 2, 2003 <?php //Printer ut table taggen print(\'<table width=\"500\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\">\'); //Sender setningen mot database som skal hente ut infoen $setning = @mysql_query(\"SELECT * FROM navn\"); //Bruker en loop for aa faa all informasjonen ut while($adresser = @mysql_fetch_array($setning)) { //Naa er informasjonen lagret i arrays print(\"<tr>\"); print(\"<td width=\"500\" background=\"meny.gif\" colspan=\"2\">$adresser[overskrift]</td>\"); print(\"<tr>\"); // here is the start of the link print(\"<td bgcolor=\"#EAEAEA\" width=\"250\">Lagt til av: <a href=\"mailto:\" . $adresser[\"mail\"] . \"\">\" . $adresser[navn] . \"</a></td>\"); // here is the end of the link print(\"<td bgcolor=\"#EAEAEA\" width=\"250\"></td>\"); print(\"</tr>n\"); print(\"<tr>\"); print(\"<td bgcolor=\"#FFFFFF\" colspan=\"2\" width=\"500\">$adresser[artikkel]</td>\"); print(\"</tr>n\"); } //Slutter av tabellen print(\'</table>\'); print(\'<br>\'); print(\'<br>\'); ?> This is the code for acessing the database and print the information out. But i want to show the mail adress that i sin the database, But with this code i cant see the link, anybody that can help me with how to get the link to work correctly? Quote Link to comment https://forums.phpfreaks.com/topic/824-getting-data-out-of-mysql-database/ Share on other sites More sharing options...
Barand Posted August 3, 2003 Share Posted August 3, 2003 Try it with quotes around \"navn\" [php:1:5a0db61e95]<?php print(\"<td bgcolor=\"#EAEAEA\" width=\"250\">Lagt til av: <a href=\"mailto:\" . $adresser[\"mail\"] . \"\">\" . $adresser[\"navn\"] . \"</a></td>\"); ?>[/php:1:5a0db61e95] hth Quote Link to comment https://forums.phpfreaks.com/topic/824-getting-data-out-of-mysql-database/#findComment-2731 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.