The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Searching the database-PHP help - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Searching the database-PHP help (/showthread.php?tid=16798) |
Searching the database-PHP help - jgold723 - Oct 31st, 2016 I've been using FT for several years to create databases and push data into them. Works great. I was able to build a pretty simple static PHP script to query the database for a set of criteria (field1=X AND field2=Y), extract data and display it. Now I'd like to build a more dynamic search form to allow users to search multiple fields in the database and I seem to be stumped. I understand the basics of building the form and pointing it at the script, etc. But for some reason I'm not getting any results. Anyway, I'm wondering if someone can point me to a resource that would be helpful for developing this? Thanks, John RE: Searching the database-PHP help - alexh - Oct 31st, 2016 Hey John, Are you looking to have text input fields, or will this be a drop down with preformatted queries? This should get you on the right track: http://www.pontikis.net/blog/dynamically-bind_param-array-mysqli I think the most important thing to think about is preventing MySQL injection through the user's input. I hope this helps.. if not let me know. I'm on mobile right now otherwise I'd see what resources I have bookmarked. Alex |