WordPress.org

Ready to get started?Download WordPress

Forums

Really Static
[resolved] PHP Contact Form? Is there a way to allow small amounts of PHP? (3 posts)

  1. Dustin Lammiman
    Member
    Posted 1 year ago #

    Hi, love your plugin. What I'm wondering is if there would be any way to still use a PHP contact form with it? Basically, the plugin would need to output .php files instead of .html file, and everything would still be static except for a very small portion of the page that I specify for it to use PHP. No database interaction, just a basic php mail() function. I do believe this is possible with some other static site generators, and I'm hoping there is a way to do it with this WordPress plugin as well.

    http://wordpress.org/extend/plugins/really-static/

  2. Erik
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,
    inside the form-tag from your contact Form you select your destination. For eaxample:
    <form action="destination.php" method="post">

    inside this destination.php you make your mail command and a header("Location:thankyou.html"); request. Thats it :-)

    http://php.net/manual/de/function.header.php

    But your idea has been noticed. At the moment i'm really short on time, this take some time...

  3. aguett
    Member
    Posted 5 months ago #

    Actually there is a way :

    I've added "manually" outside wordpress a contact.php file (a basic contact form like this one : http://web-kreation.com/all/php-contact-form-script/)

    Then I've checked the "Show expert settings" in the Really Static Admin dashboard page.

    Then on the "Settings" of Really Static there is a list of files to be copied : "Copy all attached files with following extensions to the destination server: [?]"
    => Here I've added ".php" file extension

    Of course you need your wordpress to have a link somewhere to this "contact.php" file or it won't get copied.

    Cheers,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.