Results 1 to 6 of 6

Thread: Redirect to Homepage
      
   

  1. #1
    rosecapusa is offline Sergeant
    Join Date
    Aug 2005
    Location
    Bulgaria
    Posts
    20

    Default Redirect to Homepage

    Anyone have any idea why when my, "thank you for writing, we'll now take you back to our homepage," takes viewer back to new load of homepage? Then when you click to exit, there's two home pages two click off of instead of one.
    How do you make it return to original page they opened? Here's my stuff. What's wrong with this?

    </HEAD>

    <html>

    <title>childoutreachbg.com(JavaScript: Timed Redirect on Page Load)</title>

    <body onload=setTimeout("location.href='http://www.childoutreachbg.com/index.html'",5000) bgcolor="#FFFFFF">

    <!-- time is in miliseconds 1000 is equal to ten seconds -->

    </body>

    </html>

    </HEAD>
    <BODY>
    <H2>Thanks for Writing,we'll now take you back to our home page!</H2>
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "russanddora@childoutreachbg.com";
    $mailsubj = "Form submission";
    $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>

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

    Default

    The code has lots of errors, try this:

    <html>
    <head>
    <title>Thanks for Writing,we'll now take you back to our home page</title>
    </head>
    <body onload=setTimeout("location.href='http://www.childoutreachbg.com/index.html'",5000) bgcolor="#FFFFFF">

    <H2>Thanks for Writing,we'll now take you back to our home page!</H2>
    <?PHP
    $email = $HTTP_POST_VARS;
    $mailto = "[email="russanddora@childoutreachbg.com"]russanddora@childoutreachbg.com";
    $mailsubj = "Form submission";
    $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>
    </html>
    Forum Moderator
    BlueVoda Specialist

  3. #3
    rosecapusa is offline Sergeant
    Join Date
    Aug 2005
    Location
    Bulgaria
    Posts
    20

    Default

    Quote Originally Posted by Pablo
    The code has lots of errors, try this:

    <html>
    <head>
    <title>Thanks for Writing,we'll now take you back to our home page</title>
    </head>
    <body onload=setTimeout("location.href='http://www.childoutreachbg.com/index.html'",5000) bgcolor="#FFFFFF">

    <H2>Thanks for Writing,we'll now take you back to our home page!</H2>
    <?PHP
    $email = $HTTP_POST_VARS;
    $mailto = "[email="russanddora@childoutreachbg.com"]russanddora@childoutreachbg.com";
    $mailsubj = "Form submission";
    $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>
    </html>
    "after sending email" it says, "Parse error: parse error, unexpected T_STRING in /home2/radio/public_html/site2/formmail.php on line 10"
    Say what?

    Russ

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

    Default

    Unfortunately this forum corrupts the formatting of email addresses, so
    make sure the email address is correct.
    Forum Moderator
    BlueVoda Specialist

  5. #5
    rosecapusa is offline Sergeant
    Join Date
    Aug 2005
    Location
    Bulgaria
    Posts
    20

    Default Is this crazy or what?

    Quote Originally Posted by Pablo
    Unfortunately this forum corrupts the formatting of email addresses, so
    make sure the email address is correct.
    As far as I can tell, Email address is fine but I cannot check the brackets or " or etcs because I have no script with this script line in it to check it by. I have checked all the other lines for any thing left out and I can see nothing missing. Because pasting leaves blank lines on notepad, I went back and removed all blank lines, still won't work. Just says error is now in line 9 instead of 10. So my question is, are all the other things in email line right because my email is russanddora@childoutreachbg.com

    Russ

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

    Default

    just enter your email address between quotes:
    $mailto = "russanddora@childoutreachbg.com";
    Forum Moderator
    BlueVoda Specialist

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. PHP code for redirecting page back to homepage
    By snclenney in forum General Support Issues
    Replies: 2
    Last Post: 08-07-2005, 09:28 PM
  2. My first homepage
    By sandis in forum BlueVoda - General Issues
    Replies: 2
    Last Post: 08-05-2005, 09:46 AM
  3. mystery of the disappearing homepage!
    By Laurie in forum General Support Issues
    Replies: 1
    Last Post: 06-03-2005, 12:16 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