Title: Where to put php code?
Last modified: August 21, 2016

---

# Where to put php code?

 *  [mjmj824](https://wordpress.org/support/users/mjmj824/)
 * (@mjmj824)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/where-to-put-php-code/)
 * Hi, I am trying to create a form for wordpress without using plugins but cannot
   seem to find where to store my php code. I have tried it in the root directory
   of the web site, the theme root folder , and tried making a template but the 
   page end up being blank. Could anybody tell me where php files should go on wordpress?
 * My code below:
 *     ```
       <form action="account.php" method="post" id="account" name="account"></form>
       <fieldset><legend> Account </legend><label for="name">Name:</label>
       <input id="name" maxlength="45" name="name" type="text" value="" />
       <label for="address">Address:</label>
       <input id="address" maxlength="45" name="address" type="text" value="" />
       <label for="contact">Contact:</label>
       <input id="contact" maxlength="45" name="contact" type="text" value="" />
       <label for="phone">Phone:</label>
       <input id="phone" maxlength="45" name="phone" type="text" value="" />
       <label for="fax">Fax:</label>
       <input id="fax" maxlength="45" name="fax" type="text" value="" />
       <label for="email">Email:</label>
       <input id="email" maxlength="45" name="email" pattern="[^ @]*@[^ @]*" type="email" value="" placeholder="Enter an email address" />
   
       &nbsp;
   
       <label for="hierachy">Hierachy:</label>
       <input id="hierachy" maxlength="45" name="hierachy" type="text" value="" />
   
       <input type="submit" value="Save" /></fieldset>
       ```
   

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/where-to-put-php-code/#post-4949517)
 * If you are creating a template, the code should go in the template. You must 
   then create a Page and set your new template to replace the default.

Viewing 1 replies (of 1 total)

The topic ‘Where to put php code?’ is closed to new replies.

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/where-to-put-php-code/#post-4949517)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
