php - Showing URL in a webpage -
i need url based on table in database, this:
<a href='edit.php?id=[]>e</a>
here id should final id of table. means, if have total 45 id in database table, url should this:
<a href="edit.php?id=45">e</a>
i tried code below didn't succeed. please me.
<?php include('config.php'); $query1 = "select id addd order id desc limit 1;"; $result = mysql_query($query1); $data = mysql_fetch_array($result); echo <a href='edit.php?id="$data[0]"'>e</a>; ?>
try
echo "<a href='edit.php?id={$data[0]}'>e</a>";
Comments
Post a Comment