Title: Using PHP Within WordPress- 5.2 vs 5.5
Last modified: August 22, 2016

---

# Using PHP Within WordPress- 5.2 vs 5.5

 *  [backpages](https://wordpress.org/support/users/backpages/)
 * (@backpages)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/using-php-within-wordpress-52-vs-55/)
 * I have custom forms that I build myself inside WordPress and I use PHP to process
   them. I write all the code and scripts on the page files themselves NOT within
   the WordPress admin interface. For instance I create a “page-myform.php” page
   and write the form on that and then it goes to a “page-processmyform.php” page
   where I write the PHP to process the form. I’ve been doing this for years, never
   had any problems. One thing I’ve always found is that I didn’t need to establish
   a database connection before inserting or retrieving info from the MySQL database,
   I assumed because WordPress had already made the connection.
 * Recently my host updated my account from 5.2 to 5.5.18. Suddenly, none of my 
   forms worked anymore. After a lot of trial and error it seems that the only problem
   is that I now need to actually make a database connection in my code, unlike 
   before. Then things seem to work again.
 * Can anyone confirm that switching from PHP 5.2 to 5.5.18 would require that I
   now make a database connection each time I want to send a form or pull results
   from the database? Thanks for any insight into this issue.

The topic ‘Using PHP Within WordPress- 5.2 vs 5.5’ is closed to new replies.

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php5](https://wordpress.org/support/topic-tag/php5/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [backpages](https://wordpress.org/support/users/backpages/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/using-php-within-wordpress-52-vs-55/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
