[Plugin: Shortcode Exec PHP] Including MySQL-Query destroys theme
-
Hi there, at first thank you very much for this fantastic and necessary plugin! Actually everything works fine. ;D
Beneath other scripts I do include (via require_once) an external php-file with some variables and for one variable (the date) I ask the database to give me the information and write it into the variable. For this db-query I add this:
error_reporting (E_ALL); $connection = mysql_connect ("localhost","database", "password") or die ("no connection"); mysql_select_db("table") or die ("doesnt exist");
Wenn I push the “test”-button in the plugin the results are correct (!). BUT when I publish the article some other theme-parts (from other plugins) are broken. When I delete the 2nd line (mysql_select_db(“table”)), it works again (for sure without the date), but it works fine. So what’s the matter with the database-inclusion? What I made wrong? Or HOW to include some database-entries?
Thx+Regards
Sebastian
- The topic ‘[Plugin: Shortcode Exec PHP] Including MySQL-Query destroys theme’ is closed to new replies.