Results 1 to 6 of 6

Thread: Error after publishing index.php
      
   

  1. #1
    Belgian Paul is offline Corporal
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    10

    Default Error after publishing index.php

    Hello,

    I have published my index page (www.slankadvies.com). On my index page is a contact form where readers can sign in on a newsletter. I want the mails to be delivered to my home email account. Everything seemed to be fine in the preview, but the form doesn’t send out the mail.
    After reading the threads in the Form Forum, I did the following after seeing the two tutorials

    Form name: contactform
    Action: index.php
    Method: POST
    Encoding Type: multipart / form data
    I named the fields name and email and submit
    I saved and published the page as index.php in the page properties

    I did include the following script in the inside body tag?

    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "
    van.hoof.paul@telenet.be";
    $mailsubj = "
    Nieuwsbrieven";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>


    I receive to following message:
    Parse error: syntax error, unexpected T_VARIABLE

    Questions:
    What did I do wrong?
    How can I fix this so the mail will be send to me?

    Thanks for your help

  2. #2
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Error after publishing index.php

    There is an error because the submit button is outside the form.

    1-Delete the submit button.
    2-Stretch form to cover submit button.
    3- Put submit button back on form

    Save and publish.

    Andy
    PHP- is a blast!

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Error after publishing index.php

    However this is a form error, probably created in a second time. If yu received the purse error message, it means that somehow the form worked initially. Correct the form problem as Andy suggested, and we will have a look.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  4. #4
    Belgian Paul is offline Corporal
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    10

    Default Re: Error after publishing index.php

    I did deleted the submit button and replaced it.
    The page is saved and published.
    I hope is does work now.
    Thanks for your help.

  5. #5
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Error after publishing index.php

    Going to the source code- the submit button is still not on the form.

    On the form properties- put the back ground color to grey- this will help you see its edges. Delete the submit button again. Now stretch the form down a little. Place the submit button on the form. Now change the background of the form back to white- it's original color.

    Save and publish.

    Andy
    PHP- is a blast!

  6. #6
    Belgian Paul is offline Corporal
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    10

    Default Re: Error after publishing index.php

    I did see the problem now and changed the submit button.
    I tried to send out a mail to myself, but didn't receive it in my mailbox.
    I did set my email account in Outlook.
    What could be wrong?

Thread Information

Users Browsing this Thread

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

     

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