This is a very simple redirect Double Meta Refresh to clear out the referrer but i'm getting a parse error... ticket.php <?php echo "<meta http-equiv=\"refresh\" content=\"0;url=http://domain/ticket1.php\">"; ?> ticket1.php <?php $referer = $_SERVER['HTTP_REFERER']; if($referer == "") { echo "<meta http-equiv=\"refresh\" content=\"0;url=http://offer.com/SHrN">"; } else { echo "<meta http-equiv=\"refresh\" content=\"0;url=http://google.com">"; } ?> both files upload to public_html of my hosting....
You are not escaping the last double quote at the end of your url= parameter. This should work in ticket1.php <?php $referer = $_SERVER['HTTP_REFERER']; if($referer == "") { echo "<meta http-equiv=\"refresh\" content=\"0;url=http://offer.com/SHrN\">"; } else { echo "<meta http-equiv=\"refresh\" content=\"0;url=http://google.com\">"; } ?> Code (markup):
To prevent about escaping double-quote, I prefer use single quote on the outer, and double quote on the URL. For example: <?php echo '<meta http-equiv="refresh" content="0;url=your_url_here">'; ?> Code (markup):
This should work fine now <?php $referer = $_SERVER['HTTP_REFERER']; if($referer) { echo '<meta http-equiv="refresh" content="0; url=http://offer.com/SHrN">'; } else { echo '<meta http-equiv="refresh" content="0; url=http://google.com">'; } ?> PHP: