justlukeyou Posted March 29, 2011 Share Posted March 29, 2011 I have a search form which uses an image to perform the search. The search performs correctly however it inserts details of the image in the URL, is this normal? searchdisplaytest.php?term=red-widget&image.x=50&image.y=23 Can I get rid of the "&image.x=50&image.y=23" <div class="homepagesearchtext"> <input type="text" name="term" size="20" class="homepagesearch" /> </div> <div class="searchbuttonbox"> <input type="image" name="image" value="Submit" src="http://wwwdomain.com/earch.PNG" alt="Search" name="image" > Quote Link to comment https://forums.phpfreaks.com/topic/232105-search-buttons-with-images/ Share on other sites More sharing options...
Psycho Posted March 29, 2011 Share Posted March 29, 2011 Yes, using an image as an input will pass the x,y coordinates. You could pass the form submission via POST so it does not get included in the URL. Quote Link to comment https://forums.phpfreaks.com/topic/232105-search-buttons-with-images/#findComment-1193879 Share on other sites More sharing options...
justlukeyou Posted March 29, 2011 Author Share Posted March 29, 2011 Thanks, if I use POST is it as safe as GET? Why do people use POST over GET? Quote Link to comment https://forums.phpfreaks.com/topic/232105-search-buttons-with-images/#findComment-1193883 Share on other sites More sharing options...
kenrbnsn Posted March 29, 2011 Share Posted March 29, 2011 Actually, using POST is safer than using GET, since it's harder (but not impossible) to manipulate the values being passed to the script when using POST. Also, the number of characters passed to the processing script is limited when using GET. Ken Quote Link to comment https://forums.phpfreaks.com/topic/232105-search-buttons-with-images/#findComment-1193907 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.