jquery - Adding a button to php -


this question has answer here:

     while($row = mysqli_fetch_array($result))      {       $output .= '        <tr>         <td>'.$row["reon"].'</td>         <td>'.$row["broj_na_tezga"].'</td>         <td>'.$row["ime"].'</td>         <td>'.$row["prezime"].'</td>         <td>'.$row["rok_na_dogovor"].'</td>         <td>'.$row["duledzija"].'</td>         <td>'.$row["rez_pau"].'</td>          //i want add these buttons keep getting error         <td>'<a href="update.php?id=<?php echo $row['id'];?>" class="btn btn-success btn-sm">Промени</a>       <a href="delete.php?id=<?php echo $row['id'];?>" class="btn btn-danger btn-sm">Избриши</a>       </td>        '; } echo $output; } else { echo 'Корисникот не постои'; } ?>  <!-- end snippet --> 

im new , im trying add buttons error exact" parse error: syntax error, unexpected 'href' (t_string)" pls help. tnx

this should work you:

echo "<td><a href="update.php?id=<?php echo $row['id'];?>" class="btn btn-success btn-sm">download</a></td>"; 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -