coder1 Posted September 22, 2008 Share Posted September 22, 2008 I have a form search form that can pass up to 14 parameters (all dropdown list and 2 groups of radio buttons) the user can select combination. 1) Whats the best away to build a query string from the form to pass to mysql query as currently what am doing is for each. Am not sure if that is the best way of doing it? if ($_POST["location"]!="") { $searchstring=$searchstring.$_POST["location"]; } if ($_POST["propertytype"]!="") { $searchstring=$searchstring.' and `type` = \''.$_POST["propertytype"].'\''; } The query can return large resultset so I implemented a simple paging. 2) how do go about using the above $_post method to build a query string to pass to a url. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/125316-building-a-query-string/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.