I have script which inserts the users ID into a database by using a standard form and submit however. However I am trying to shrink this all down to an image so someone can click an image which inserts the users ID into the database.

However I am unsure on how to do this. Should I be using a form?


if(isset($_POST['followform'])) {

        $follow = $_POST['follow'];
$query_follow ="UPDATE users SET follow = '".$_POST['follow']."'" ;
$result_newUser = mysql_query($query_follow);
                $result = mysql_query($query_follow) or die("An error occurred ".mysql_error());

<form class="followform" method="POST" action="">
<div class="forminputcell">
<div class="datainput">
  <div class="forminputleft">
  <div class="forminputright">  
<input   name="follow" type="text" width="10" value="<?php echo $row['id']; ?>" />
          <div class="user-area">
          <input type="hidden" name="followform" value="submit" />
<input type="submit" name="submit" value="Submit" class="submit-button" />