• Hi,

    great plugin which fulfills (nearly) all my requirements.

    If I try to create a form (input field) I am not able to use the information entered by the user on the target page (which is defined in the <form> section (“action=”…”) as the information entered is not available in the variable specified in the <input> section.

    I learned that a predefined object can be used to exchange data between snippets ($PHPPC …) (and posts?) but this does not work with a form – or am I wrong?

    I would appreciate it if there is a solution for this problem …

    Thx,
    Harald

    https://www.ads-software.com/plugins/php-code-for-posts/

Viewing 1 replies (of 1 total)
  • I am having some troubles using a form with this plugin as well. My form will not show up. here is my code:

    <?php

    $action=$_REQUEST[‘action’];

    if ($action==””) /* display the contact form */
    {

    ?>

    <form action=”” method=”POST” enctype=”multipart/form-data”>
    <input type=”hidden” name=”action” value=”submit”>
    Your name:
    <input name=”name” type=”text” value=”” size=”30″/>
    Your email:
    <input name=”email” type=”text” value=”” size=”30″/>
    Your message:
    <textarea name=”message” rows=”7″ cols=”30″></textarea>
    <input type=”submit” value=”Send email”/>
    </form>

    ?>
    <?php

    }
    else{
    $name=$_REQUEST[‘name’];
    $email=$_REQUEST[’email’];
    $message=$_REQUEST[‘message’];
    if (($name==””)||($email==””)||($message==””))
    {
    echo “All fields are required, please fill the form again.”;
    }
    else{
    $from=”From: $name<$email>\r\nReturn-path: $email”;
    $subject=”Message sent using your contact form”;
    mail(“[email protected]”, $subject, $message, $from);
    echo “Email sent!”;
    }

    }

    ?>

    Any help is appreciated!

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with using a form’ is closed to new replies.