• Hi, I want to create my own forms in my wordpress websites. I am not overly fond of using Plug-In’s like Contact Form 7. I want the form to be able to send the email and also load the information from the sender in the database. I have asked a question like this before and a couple of people sent me emails about using the get_permalink() function. I am presently working with Twentythirteen Theme.
    I would like some guidance on how to use this function properly. So my form set up is as follows:

    <form method=”post” action=”get_permalink();” name=form></form>

    In order to make get_permalink working do I load the template name, url into the space between the two brackets. e.g.

    <form method=”post” action=”get_permalink(‘https://www.websitename.com/process_page.php&#8217;);” name=form></form>

    If I do it this way, when the submit button is pressed on a form on my page will it get processed. Or is there something that I am missing, or should I be doing it another way.

    I appreciate any help that is forthcoming. I have not uploaded the site yet but if I have any success I will definitely make another post and explain how to do it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’d recommend you check out the codex page for get_permalink. It explains quite nicely how the function works. The function is used to get the url for a page or post by providing the id, like so: <?php echo get_permalink($ID); ?> or <?php echo get_permalink(243); ?>.

    But really, why don’t you just set the action directly to the page for processing your form like so?

    <form method="post" action="/process_page.php');" name=form></form>

    Thread Starter vinsprinter

    (@vinsprinter)

    Hi Jack,

    I have tried that last option you have shown me without any success. But I am willing to give it a go again. Otherwise I will try it again tomorrow. I will be back here to let you know how I got on with both methods. Thanks for the trouble taken for now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.process-page.php in WordPress’ is closed to new replies.