0

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

Edited by bLuEmEzzy: I put my text on the codes.

2
Contributors
2
Replies
40
Views
1 Year
Discussion Span
Last Post by bLuEmEzzy
1

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'].

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.