• I would like to add a page to my site containing fields generated using embedded HTML and parsed and stored in a database using PHP. I’m not looking for help creating the HTML/PHP, just for the proper way to do this in WordPress. Can I just embedded the html/php when I add the page? This is going to be a single page, so I didn’t think I needed to create a template.

    I want the page to both generate the fields and process them depending on whether the form as been submitted or not by testing a hidden “submitted” field. Can I just reference the permalink in the action attribute like so:

    <form action=”http://www.savenjnow.com/softsys/?page_id=16&#8243; method=”post”>

    Thanks
    Scott

Viewing 2 replies - 1 through 2 (of 2 total)
  • Can I just embedded the html/php when I add the page?

    No, not by default. PHP embedded in pages, posts and text-widgets doesn’t execute. ExecPHP will change that, though.

    This is going to be a single page, so I didn’t think I needed to create a template.

    I’d make a template if it were me. If nothing else, it makes the code easy to find and to edit.

    Can I just reference the permalink in the action attribute…

    If the same page is processing the request you can leave the form action="", at least if you do it with a template.

    Did you get this to work? If so do you mind posting an example. I’d like to do the same or something similar.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding Custom Form w/php’ is closed to new replies.