russianbear Posted August 25, 2009 Share Posted August 25, 2009 Need a recommendation. I'm making a mini craigslist version and I would like to implement a search functionality. The search will work such - the user will enter some search parameters that I will use to query the db of posts that match their search. The format that I would like to implement for displaying the search results is creating a list of titles that are hyperlinks to the actual posts - exactly the same way that craigslist has done it. Is it better to use AJAX to accomplish this or is there a clean way to do this using PHP... It just seems to me that it doesn't make much sense to send every single post's data across to the client when they might only end up viewing 1 of the posts. Quote Link to comment https://forums.phpfreaks.com/topic/171817-php-or-ajax/ Share on other sites More sharing options...
kickstart Posted August 25, 2009 Share Posted August 25, 2009 Hi Should be in the php section. AJAX doesn't rely on having every post there. With AJAX you would call a small php script that would search the database and return the matching links, and then display those on screen for the user to select from. Basically using javascript to call a php script in the background without the user knowing. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/171817-php-or-ajax/#findComment-905982 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.