Searching custom table
-
I’ve little/no experience with wordpress/CMS’s, though i’m comfortable coding. I made a wordpress post that includes a form. The form action posts to a custom_search.php page I wrote. Custom_search.php connects to the mysql database on our hosted server, and returns results from a non-wp table. This works perfectly fine if the database credentials are stored in the custom_search.php. However, to be inline with best practices I used the line “require(connect.php)”. That file (connect.php) has the credentials to connect to the database stored in variables that are passed to custom_search.php. With the require statement – I get an error. That error removes the dot in connect.php – which has me thinking that for security reasons wordpress strips out dots at some point.
Obviously there’s something I’m missing. Do I need to alter my php, change a wordpress setting, or use a plugin? I’m lost on where to go from here.
Any help would be greatly appreciated! Thanks.
- The topic ‘Searching custom table’ is closed to new replies.