samedi 2 juillet 2016

PHP Turn Links into Buttons

I am working on a program that allows the user to view files/images from a database. Currently, you can move between files/images using a link:

$prev_key=$filenum.'_'.($fileindex-1);
$next_key=$filenum.'_'.($fileindex+1);

if(($fileindex-1)>=1)
  echo '<a href="view_file.php?k='.$prev_key.'">Prev File</a>';

if(($fileindex+1)<=$totalfilect)
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_file.php?k='.$next_key.'">Next File</a>';

However, I would like to change the links into buttons with the same function. How would I go about doing that?

Thanks for any help you can give!

Aucun commentaire:

Enregistrer un commentaire