PHP Code for posts
Problem with using a form (2 posts)

  1. iharald112
    Posted 2 years ago #


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



  2. battingboy90
    Posted 2 years ago #

    I am having some troubles using a form with this plugin as well. My form will not show up. here is my code:



    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"/>


    if (($name=="")||($email=="")||($message==""))
    echo "All fields are required, please fill the form again.";
    $from="From: $name<$email>\r\nReturn-path: $email";
    $subject="Message sent using your contact form";
    mail("battingboy90@aol.com", $subject, $message, $from);
    echo "Email sent!";



    Any help is appreciated!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • PHP Code for posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic