php - How to add link to mysql database record as a <html> href? -
if($rezultat = $polaczenie->query($sql)) $ilu_userow = $rezultat->num_rows; while($ilu_userow>0){ $wiersz = $rezultat->fetch_assoc(); $id = $wiersz['id']; $like = $wiersz['likes']; $price = $wiersz['price']; echo '<div class="pozycja"> <span> <h1><font color="blue"/> ' . $id . ' </h1></font><font color="red"/> ' . $like . ' </font><h2><strong><font color="green"/> ' . $price . '</h2></strong></font></span></div>'; $ilu_userow = $ilu_userow - 1; }
this code, , - in topic - want create html adress every row database, , question - how?
if($rezultat = $polaczenie->query($sql)) $ilu_userow = $rezultat->num_rows; while($ilu_userow>0){ $wiersz = $rezultat->fetch_assoc(); $id = $wiersz['id']; $like = $wiersz['likes']; $price = $wiersz['price']; echo '<div class="pozycja"> <span> <h1><font color="blue"/> ' . $id . ' </h1></font><font color="red"/> ' . $like . ' </font><h2><strong><font color="green"/> ' . $price . '</h2></strong></font></span>'; //added line start echo '<a href="file.php?id='.$id.'">'.$id.'</a>'; echo '</div>'; //added line end $ilu_userow = $ilu_userow - 1; }
Comments
Post a Comment