Jump to content

PHP or AJAX???


russianbear

Recommended Posts

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. :confused:

Link to comment
https://forums.phpfreaks.com/topic/171817-php-or-ajax/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/171817-php-or-ajax/#findComment-905982
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.