Convert Form 'action' over to href
Posted: Sat May 09, 2009 4:07 am
Hi,
I want to replace this:
With this or similar (if I can)
My function is:
So I’m not really sure how to approach this as I think that I need to include some sort of Post array in my ‘href’ above but I’m not sure how to go about this or if that is even possible.
Any help would be great
Thanks
I want to replace this:
Code: Select all
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input name="logout" type="submit" value="Logout when finished">
<input type="hidden" name="action" value="logout">
</form>Code: Select all
' Logout when finished <a href="' .$_SERVER['PHP_SELF'] .'?action=logout">Logout</a>';Code: Select all
//Stage 2 - The Logout
if ($_POST['action'] == "logout")
{
function logout() etcAny help would be great
Thanks