Announcement

Collapse
No announcement yet.

Error after publishing index.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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!

    Comment


    • #3
      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!

      Comment


      • #4
        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.

        Comment


        • #5
          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!

          Comment


          • #6
            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?

            Comment

            Working...
            X