Results 1 to 10 of 10

Thread: Andy, I need your help please! ...
      
   

  1. #1
    Jeremy's Avatar
    Jeremy is offline Brigadier General
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    1,503

    Arrow Andy, I need your help please! ...

    Hey Andy!

    I have a .php script for a site we are still creating and it says this when you click submit:

    Parse error: syntax error, unexpected '>' in /home/rgcoscom/public_html/thankyou.php on line 43

    .. any clue?
    Go to: www.rgcollectibles.com
    Best regards,
    Jeremy

    www.cornwall4rent.com

  2. #2
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Andy, I need your help please! ...

    Jeremy, Email me a copy of the script and I will see what I can do !!
    or copy and paste it here...........

  3. #3
    Jeremy's Avatar
    Jeremy is offline Brigadier General
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    1,503

    Default Re: Andy, I need your help please! ...

    <script language="php">
    $email = $HTTP_POST_VARS[email];
    $mailto = "jeremy@bwservices.ca";
    $mailsubj = "RGC / Feedback received";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "RGC / Feedback received:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
    if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj,





    Thanks!
    Best regards,
    Jeremy

    www.cornwall4rent.com

  4. #4
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Andy, I need your help please! ...

    Jeremy, is this the complete script ??
    If the script is confidential then please email me the complete script

    if the above is only an extract then see below for the correct format:

    (extract only)
    <?PHP
    //Sending Email to form owner
    $mailto = "jeremy@bwservices.ca";
    $mailsubj = "RGC / Feedback received";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "RGC / Feedback received:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    header("Location: confirmationpage.html");
    ?>

  5. #5
    Jeremy's Avatar
    Jeremy is offline Brigadier General
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    1,503

    Default Re: Andy, I need your help please! ...

    Let me try, then I will e-mail you. Thanks.
    Best regards,
    Jeremy

    www.cornwall4rent.com

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

    Default Re: Andy, I need your help please! ...

    Hey Jeremy-
    Sounds like you and David are well on your way to solving this. I'll be around.

    Cheers,

    Andy
    PHP- is a blast!

  7. #7
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Andy, I need your help please! ...

    Hi andy, I stepped in because you must have been busy.........

    Jeremy:

    You need to go back to your contact form and nename every field first:
    name
    email
    subject
    message
    (all small letters as above)

    you then need to contract(shorten) the text fields to the left of your form fields(they overlap the form fields)

    I will post the complete php script for you shortly.
    (your script was only an extract from another script and would never work as it stood)

  8. #8
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: Andy, I need your help please! ...

    Hi Jeremy,
    Here is the very simple php script that will work with the field names that I
    posted earlier.
    Please note that this script does not contain any error checking or
    secutity features.
    It also sends a copy of the info submitted back to the client...............

    You must create a bv page called "confirmationpage" which will thank your client etc.
    If you already have a page as such, change the last but 1 line to your page name.

    This php script is called thankyou.php and you should use your ftp program
    to upload to the same directory as your other contact pages.

    let me know when you have completed ALL of the above, and I will test your form for you............any problems, email me or post here again.

    good luck

    <?PHP
    // Receiving variables
    @$name = addslashes($_POST['name']);
    @$email = addslashes($_POST['email']);
    @$subject = addslashes($_POST['subject']);
    @$message = addslashes($_POST['message']);
    //Sending Email to form owner
    $mailto = "jeremy@bwservices.ca";
    $mailsubj = "RGC / Feedback received";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "RGC / Feedback received:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    // Autoresponder
    $mailto = $email;
    $mailsubj = "Copy of the info you Submitted";
    $mailhead = "From: jeremy@bwservices.ca\n";
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    header("Location: confirmationpage.html");
    ?>

  9. #9
    ez-ez is offline Special Status
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    1,329

    Default Re: Andy, I need your help please! ...

    G'day Jeremy.. 2 things..

    The flag you are using for Spanish Language doesn't look like the Spanish flag.. is that the Mexican Flag..??

    Did you get the script problem sorted out..??

  10. #10
    Jeremy's Avatar
    Jeremy is offline Brigadier General
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    1,503

    Default Re: Andy, I need your help please! ...

    Hey Carlos!

    Yes, the problem has been fixd, thanks. The flag that I am using was given by the customer who wanted me to add a Spanish language in the future.
    Best regards,
    Jeremy

    www.cornwall4rent.com

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