Jump to content

Text Area CSV Search


Matl

Recommended Posts

Hello,

I have a very basic search form that I would like to be able to pass to my PHP processing script so that a single column in the Mysql table can be matched against all comma separate values that the user enters into the form text area field.  I can't seem to get the exact solution.

 

Form text area is named: center

 

$centersearch=$_POST["center"];

 

SELECT * FROM cities WHERE center LIKE '%$centersearch%'

Would I need to do a pregreplace to eliminate the commas before using them in my query or enter them into an array of some sort?

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/233386-text-area-csv-search/
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.