sehummel sehummel - 1 month ago 18
PHP Question

PHP: print '<meta http-equiv="refresh" content="0;url=' with URL parameters

How do I create this string with URL parameters? What I want is something like:

print '<meta http-equiv="refresh" content="0;url=http://domain.com?a=1&b=2">';


But that doesn't pass my second parameter correctly. I get a ")" instead of a b. What am I doing wrong?

I've tried
&amp;
instead of the ampersand, but that doesn't work either,

Answer
echo "<meta http-equiv='refresh' content='0;url=http://domain.com?a=1&b=2'>";

or even

header ("Location: url=http://domain.com?a=1&b=2");

since you are using 0 as delay

Comments