Hi Guys Im trying to search in a textbox on my form and its value will load on the table. But I cannot get how, and also what should I use, I only know PHP and simple Javascript, Please help me. I only want to know on how can I load the the textbox values on the table.. Thank you.

<input type="text" id="txtsearch" name="txtsearch" /><br>

$load = "SELECT * from tbl b inner join item c on b.prid = c.pid itemd ='%".$TEXTBOXVALUE."%' ORDER BY datee desc"; 

....and codes here for displaying on the table from database...

Recommended Answers

All 2 Replies

Member Avatar for diafol

I'm assuming that $TEXTBOXVALUE has been sanitized - otherwise either sanitize it or use a prepared statement (DW Tutorial: Common Issues with MySQL and PHP )

If you are sending the search form via traditional methods (not Ajax) - use GET not POST for simple retrievals, so you have the textbox value in $_GET['txtsearch'].

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.