post to self

Posted on 16th Feb 2014 by admin

Trying to get my form to submit to itself. However I am also trying to use an image for my submit button, when I set the type='image' it will not submit to itself. Can someone help me figure out why?

my button code:
<input type='submit' name='submit' value='submit' src='img/button_add.gif' width='64' height='25' class='outline' onmouseover="javascript:this.src='img/button_add2.gif';" onmouseout="javascript:this.src='img/button_add.gif';">

my if:

if( isset($_POST['submit']))


form:
Code: <form method='post' action="<?php echo $_SERVER["PHP_SELF"]; ?>" name='mailcheck' id='form_id'>

Everything works well if I don't post to self so I can always do that

Other forums