Mitka Posted October 22, 2014 Share Posted October 22, 2014 Hi, I'm trying to modify a search code but I'm not able to get any results and I'm not getting any errors. The page is supposed to allow the user to search by one or multiple fields and return the according results. The code was originally using the depreciated MySQL and I was trying to modify to MYSQLI. I'm not sure that I'm using it correctly. I have attached the files. If anyone can look at it and possibly correct it I'd greatly appreciate it. Attached Files: index.html - User Search Page search.php - Search Code Users.txt - Data I've been using (rename to csv). I'm using WAMP. Thanks, Mitka index.html search.php Users.txt Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted October 22, 2014 Share Posted October 22, 2014 Place this the top of your search.php and see if any errors error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); You have a $conn instead of $con line 7 in search.php Try that and can look more if need it. Quote Link to comment Share on other sites More sharing options...
Mitka Posted October 22, 2014 Author Share Posted October 22, 2014 Hi, Didn't make a difference. The code you gave didn't do anything. Mitka Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted October 22, 2014 Share Posted October 22, 2014 if would help if you told us or showed us what output you are getting. just telling us you are getting no result can mean a number of different things. what output are you getting from the code? as to the mysqli code, your connection and connection error checking is a mix of procedural and oop usage that isn't correct. it also looks like it had a trigger_error() statement in it at one point that got removed. the php.net documentation contains examples of using procedural code to make a connection and testing if the connection worked. you should start by reading the documentation. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.