faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

14 of 20 people (70%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

how can you insert a mysql field into a link tag using php?

Feb 22nd, 2008 03:22
dman, Henrik Hansen, Jon Doe, http://www.ttnr.org


<?php
//connection stuff goes here
$sql = "SELECT field FROM table";
$result = mysql_query($sql);
$arrContent = mysql_fetch_array($result);
echo "<a href=\"http://fsck.dk/index.php/?field=" . 
$arrContent["field"] . "\">Click here</a>";
?>