anthony-needs-you Posted January 9, 2009 Share Posted January 9, 2009 Hi i have some sort by buttons: <form method="POST" action="<?php echo($_SERVER['PHP_SELF']); ?>"> <input name="resort" value="resort" type="image" onMouseOver="this.src='elements/images/layout/r-resort-active.gif'" onMouseOut="this.src='elements/images/layout/r-resort-inactive.gif'" src="elements/images/layout/r-resort-inactive.gif" class="button" border"0"> </form> This is the code it posts to: if(isset($_POST['authorDate'])){ $authorDate=$_POST['authorDate']; $type="authorDate"; }elseif(isset($_POST['hotel'])){ $hotel=$_POST['hotel']; $type="hotel"; }elseif(isset($_POST['destination'])){ $destination=$_POST['destination']; $type="destination"; }elseif(isset($_POST['resort'])){ $resort=$_POST['resort']; $type="resort"; }elseif(!isset($_POST[''])){ $type="hotel"; } and this is the part of the code it sorts via $type: $query = "SELECT id, destination, author, resort, hotel, authorDate, description, stars FROM reviews ORDER BY $type LIMIT $startrow, 10"; It works in firefox but not in IE does anyone know why? Quote Link to comment https://forums.phpfreaks.com/topic/140092-image-submit/ Share on other sites More sharing options...
anthony-needs-you Posted January 9, 2009 Author Share Posted January 9, 2009 . Quote Link to comment https://forums.phpfreaks.com/topic/140092-image-submit/#findComment-733300 Share on other sites More sharing options...
haku Posted January 11, 2009 Share Posted January 11, 2009 Look at the source code, and make sure that the action in the form tag is being properly set. Quote Link to comment https://forums.phpfreaks.com/topic/140092-image-submit/#findComment-734750 Share on other sites More sharing options...
PFMaBiSmAd Posted January 11, 2009 Share Posted January 11, 2009 Read this for how to use an image as a submit button so that it works in all browsers - http://us.php.net/manual/en/faq.html...tml.form-image The W3.org definition for an image button only requires that the x,y coordinate values be sent when the button is clicked. The browsers that send the value="..." parameter are actually providing a custom browser specific action that is not defined in the w3.org standard. Quote Link to comment https://forums.phpfreaks.com/topic/140092-image-submit/#findComment-734781 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.