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

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -