Jump to content

[SOLVED] how to getting link from database


beboo002

Recommended Posts

hello all

i am creating a dynamic site but i hav problem to fetch the value form database with link

<?

include_once("includes/db.php");

include_once("includes/functions.php");

$sql="select * from tbl_cat where sub_cat_id=0 order by rand() limit 2 ";

$res=mysql_query($sql,$link);$query=mysql_fetch_row($res);

while ($row=mysql_fetch_array($res))

{

//echo "<td>$row[cat_name]</td>";

 

}

?>

 

need here link like

<a href="category.php?display_cat_id=<?=$row_cat['id'];?>"><?=$row_cat['cat_name'];?></a>

but i cont able to do this although it was not giving any error also not showing any result

and <?=$query["2"];?>is work properly with out link.

 

Link to comment
https://forums.phpfreaks.com/topic/67862-solved-how-to-getting-link-from-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.