• 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)
  • 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.