Posts Tagged ‘PHP’


Connecting to Another MySQL Database With WordPress

Posted on February 13th, 2014

MySQL and WordPress logos

A recent project required that I access data from a separate database, in a custom WordPress page template. The data also needed to be retrieved before the opening <html> tag. By opening another database connection here, WordPress threw a fit, and failed to load the page’s menus. After hours to troubleshooting and searching for answers on countless forums, I finally found a solution…

Read more of Connecting to Another MySQL Database With WordPress »


Using PHP on Pages with HTML Extensions

Posted on January 13th, 2006

Recently we wanted to use PHP includes in an existing site so I could make updates to common parts of the site faster by editing one file (e.g.: header, navigation, footer, etc.). The problem was the site was designed with all pages ending in .html. Of coarse we could have changed all the pages to .php but the site has very good search engine rankings, and many other sites already link to these .html pages. After a little research, we found the solution to be the .htaccess file.

Read more of Using PHP on Pages with HTML Extensions »


Fix for PHP Mail Form Email Injection Hijack

Posted on September 13th, 2005

Spam is one thing, but hijacking form mail scripts and spoofing other people’s domains and email is downright wrong. We need tough(er) penalties against these guys.

Lately our customers and ourselves had been receiving hundreds of emails sent from the forms on our sites. All form fields were filled out with email addresses from the domain in which it was sent. After checking the headers it was found that most had a BCC address of .

After a little research, and a heads up by a fellow website designer in our area, it looks like this automated hijack is going to become a very big and widespread problem.

Read more of Fix for PHP Mail Form Email Injection Hijack »