Hello,
I want to do a search on my site with a display page by page, my 1st problem is that I lost my application by changing the page and I also want to test whether my field "text" is empty.
Here is my code
Code:?php mysql_connect("Xxxx", Xxxxx, ") mysql_select_db("Xxxxxx"); classdbSearch ( / / Words and expressions to search private $ words; / / Separator private $ September; / / Search option private $ options; / / Number of words private $ count_words; / / Where clause private $ query_where=''; publicfunction__construct($ Search_options, $ Search_text) ( $ This->query_prepared=1; / / Search option $ This->option=$ Search_options; / / Search AND if ($ This->option=='All') ( $ This->September='AND'; $ This->option=1; $ This->words=explode('', addslashes($ Search_text)); $ This->count_words=count($ This->words); ) / / OR search else if ($ This->option=='One') ( $ This->September='OR'; $ This->option=2; $ This->words=explode('', addslashes($ Search_text)); $ This->count_words=count($ This->words); ) / / Exact phrase else ( $ This->option=0; $ This->words[0] =addslashes($ Search_text); ) )
Bookmarks