Hey Warriors :-) Previously I had:
PHP, HTML, and Javascript Redirect Help
9
Hey Warriors :-)
Previously I had:
Now I want to include the Google Analytics snippet code, which is in a body-bottom.php file, into this page but cannot as this doesn't work.
So I've come up with two alternatives that appear to work.
My questions:
1) Would the body-bottom.php get loaded in both the meta and javascript redirect?
2) Is there some way to use the php redirect and include the Analytics file? I really like the php header redirect because you don't see the page load - creating a smoother (and seemingly safer) user experience.
Previously I had:
Code:
<?php $thankspage = $_POST['redirect']; header("location: $thankspage"); ?>
Code:
<?php $thankspage = $_POST['redirect']; include($_SERVER['DOCUMENT_ROOT'].'/inc/body-bottom.php'); header("location: $thankspage"); ?>
Code:
<?php $thankspage = $_POST['redirect']; ?> <html> <head> <meta http-equiv="refresh" content="0;url=<?php echo $thankspage ?>"> </head> <body> <?php include($_SERVER['DOCUMENT_ROOT'].'/inc/body-bottom.php'); ?> </body> </html>
Code:
<?php $thankspage = $_POST['redirect']; ?> <html> <body onLoad="submit_form();"> <form name="myform" action="<?php echo $thankspage ?>" method="POST"> <p>Redirecting. If not, please <a href="javascript:document.myform.submit();">click here</a>.</p> </form> <?php include($_SERVER['DOCUMENT_ROOT'].'/inc/body-bottom.php'); ?> </body> </html>
1) Would the body-bottom.php get loaded in both the meta and javascript redirect?
2) Is there some way to use the php redirect and include the Analytics file? I really like the php header redirect because you don't see the page load - creating a smoother (and seemingly safer) user experience.
- PHIMind
- Brandon Tanner
- [1] reply
- Joshua Uebergang
- webpro4hire
- AlexanderC
- [1] reply
- Joshua Uebergang
- indianbill007
Next Topics on Trending Feed
-
9