January 6, 200917 yr I have got a PHP file with this line of code: echo '<meta http-equiv="refresh" content="0;url=">'; I want the URL to be a variable, E.g. echo '<meta http-equiv="refresh" content="0;url=$URL">'; But when I do this it loads mysite/$URL instead of loading the URL. Any idea how to add this in so that it is a function/variable instead of interperating that as the URL? As you can tell, Im not good with PHP
January 6, 200917 yr or <meta http-equiv="refresh" content="0;url=<?php echo $URL;?>"> But really as Christopher has said, you should just use PHP's built-in header redirect as it send's the correct hTTP headers to the browser.
January 6, 200917 yr But when I do this it loads mysite/$URL instead of loading the URL. Which is what you asked it to do try http://$URL
Create an account or sign in to comment