<form action="profile.php" method="post" id="foo"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="joingroup" /> <input type="hidden" name="usergroupid" value="X" /> </form> Link <a href="#" onclick="document.getElementById('foo').submit();return false;">Join Group X</a> Image <a href="#" onclick="document.getElementById('foo').submit();return false;"> <img src='imageurl.gif' width='50px' height='50px' alt=''> </a>
<form action="profile.php" method="post" id="foo"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="leavegroup" /> <input type="hidden" name="usergroupid" value="X" /> </form> Link <a href="#" onclick="document.getElementById('foo').submit();return false;">Join Group X</a> Image <a href="#" onclick="document.getElementById('foo').submit();return false;"> <img src='imageurl.gif' width='50px' height='50px' alt=''> </a>
<form action="profile.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="joingroup" /> <input type="hidden" name="usergroupid" value="X" /> <input type="submit" class="button" value="Join Group X" /> </form>
<form action="profile.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="leavegroup" /> <input type="hidden" name="usergroupid" value="X" /> <input type="submit" class="button" value="Join Group X" /> </form>