Jump to content

Search field in a table with MySQL DB


frist44

Recommended Posts

I have a simple table displaying fields and filtering by date and status. I would like to have a search field that modifies the SQL query. How is that usually handled when the textbox is empty? I have it set when:

 

extract($_POST, EXTR_SKIP);

if (!$_POST){

$txtsearch = "%";

}

 

But when there is the txtsearch field is empty is returns nothing. ideas?

Link to comment
https://forums.phpfreaks.com/topic/148293-search-field-in-a-table-with-mysql-db/
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.