Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.