Page 1 of 1

Gif Input tag not working with code

Posted: Sat Nov 14, 2009 3:20 am
by edawson003
I had a mysql query and while loop that I triggered with an submit input tag. I wanted to replace the generic button witg gif button created, but now the return won't work with the new button. Is there something I am missing?

old input button:
<input type=submit name=search2 value=Search>

new gif button:
<input type=image name=search2 value=Search src=../images/submit_b.gif width=70 height=17 ALT=Submit>

Code: Select all

<?php   
    if(isset($_POST['search2'])){    
    if(isset($_GET['searchcriteria']) && isset($_GET['go'])){      
    $searchparameter2 = mysql_real_escape_string($_POST['searchparameter2']);   
    $extype = $_POST['extype'];
    $movementtype = $_POST['movementtype']; etc etc etc

Re: Gif Input tag not working with code

Posted: Sat Nov 14, 2009 4:17 am
by onion2k
When you use an image input element you don't get $_POST['search2'] set. You get $_POST['search2_x'] and $_POST['search2_y']. Just check to see if one of those is set.

Re: Gif Input tag not working with code

Posted: Sun Nov 15, 2009 9:39 am
by edawson003
I tried $_POST['search2_x'] and it worked. Thanks a lot!