Redirect to Homepage

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

    • Aug 2005
    • 20

    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>
  • Pablo
    Moderator

    • May 2005
    • 507

    #2
    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 Spe******t

    Comment

    • rosecapusa
      Sergeant

      • Aug 2005
      • 20

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

      Comment

      • Pablo
        Moderator

        • May 2005
        • 507

        #4
        Unfortunately this forum corrupts the formatting of email addresses, so
        make sure the email address is correct.
        Forum Moderator
        BlueVoda Spe******t

        Comment

        • rosecapusa
          Sergeant

          • Aug 2005
          • 20

          #5
          Is this crazy or what?

          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

          Comment

          • Pablo
            Moderator

            • May 2005
            • 507

            #6
            just enter your email address between quotes:
            $mailto = "russanddora@childoutreachbg.com";
            Forum Moderator
            BlueVoda Spe******t

            Comment

            Working...
            X