+ Reply to Thread
Results 1 to 3 of 3

Thread: Form problems... once again
      
   

  1. #1
    Patti Johnson's Avatar
    Patti Johnson is offline Sergeant Major
    Join Date
    Jul 2005
    Posts
    95

    Exclamation Form problems... once again

    (please read entire post) I have two pages on my site that include submitting forms... one feedback and the other story submission. The page for submission works great, except that the screen that pops up after they hit submit saying "Thank you for submitting" allows the reader to go back or close out. Obviously if they close out, they close out of the site. I want this window to close out and return to the last page they were on. If someone could tell me how to correct this, that would be great. Otherwise, it works great and I receive the emails from the submissions.

    The other page, feedback, is not working at all. I set it up the same as the submission page, except of course the email address in the code is different along with the subject line. Here's the code for the form object properties for the feedback:
    <FORM NAME=Feedback METHOD=POST ACTION="feedback.php">

    <DIV style="position:absolute; left:141px; top:345px; width:78px; height:30px; z-index:9" align="left" align="top">

    <INPUT type="submit" name="Submit" value="Submit">

    </DIV>

    <DIV style="position:absolute; left:23px; top:21px; width:310px; height:307px; z-index:10" align="left" align="top">

    <TEXTAREA name="Feedback Form" style="WIDTH: 305px; HEIGHT: 302px" rows=21 cols=35>Write feedback here.</TEXTAREA>

    </DIV>

    </FORM>

    and here's the notepad file for this feedback form that has been saved as feedback.php, uploaded and currently resides in the lifeatfifty folder (same place as the other notepad file that seems to be working for my submission page):

    <HTML>
    <HEAD>
    <TITLE>Thank you for your Feedback</TITLE>
    </HEAD>
    <BODY>
    <H2>Thank you for your feedback.</H2>
    <?PHP
    $email = $HTTP_POST_VARS;
    $mailto = "[email="feedback@lifeatfifty.com"]feedback@lifeatfifty.com";
    $mailsubj = "Feedback";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody .= "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
    </BODY>
    </HEAD>

    I did a copy and page for both codes, so I know they're identical except for the changes I made to the email, etc.

    What happens is that when you type something in the feedback box, the url changes to www.lifeatfifty.com/feedback.php but nothing else happens. My site is www.lifeatfifty.com... if someone could go to the feedback page and see what it's doing, I would be very grateful. Thank you in advance for your help and assistance.

    Patti




  2. #2
    Pablo is offline Moderator
    Join Date
    May 2005
    Posts
    507

    Default

    2 Problems:

    1. There's no email field in the form. This code requires an editbox with the name 'email'.

    2. The PHP code is not correct, why did you change it?
    Here's my orginal code:
    <HTML>
    <HEAD>
    <TITLE>Thank you for your feedback</TITLE>
    </HEAD>
    <BODY>
    <H2>Thank you for your feedback!</H2>
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "yourname@yourdomain.com";
    $mailsubj = "Feedback form";
    $mailhead = "From: $email\n";

    reset ($HTTP_POST_VARS);

    $mailbody = "Values submitted from web site form:\n";

    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody .= "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
    </BODY>
    </HEAD>
    Forum Moderator
    BlueVoda Specialist

  3. #3
    Patti Johnson's Avatar
    Patti Johnson is offline Sergeant Major
    Join Date
    Jul 2005
    Posts
    95

    Post

    Thanks Pablo... I used the code you supplied... I don't believe that I changed anything other than the email section, and added an email textbox to my form (although the email field apparently isn't mandatory in order for someone to submit) and now it's working. Can you tell me how to get the reader back to my site after the window comes up saying "thank you for your feedback"? Is it possible to put in a "return" button possibly?

    Thanks as usual,
    Patti

    Quote Originally Posted by Pablo
    2 Problems:

    1. There's no email field in the form. This code requires an editbox with the name 'email'.

    2. The PHP code is not correct, why did you change it?
    Here's my orginal code:
    <HTML>
    <HEAD>
    <TITLE>Thank you for your feedback</TITLE>
    </HEAD>
    <BODY>
    <H2>Thank you for your feedback!</H2>
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "yourname@yourdomain.com";
    $mailsubj = "Feedback form";
    $mailhead = "From: $email\n";

    reset ($HTTP_POST_VARS);

    $mailbody = "Values submitted from web site form:\n";

    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody .= "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
    </BODY>
    </HEAD>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 9
    Last Post: 11-24-2005, 03:23 AM
  2. E-mail form problems
    By prosper in forum Email Problems (POP, SMTP & Webmail)
    Replies: 3
    Last Post: 10-07-2005, 10:49 PM
  3. Trouble With Form
    By Rilstone Productions in forum General Support Issues
    Replies: 2
    Last Post: 09-28-2005, 11:30 PM
  4. HTML code for Contact Form
    By Patti Johnson in forum BlueVoda - General Issues
    Replies: 2
    Last Post: 09-22-2005, 06:56 PM
  5. E-Mail Form Problems
    By Chaz in forum General Support Issues
    Replies: 6
    Last Post: 07-26-2005, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49