alain dhaene wrote:
I have a variable
$order_nummer = "C.45";
Then I redirect to
header('Location: xmlorderon.php?order_id=$order_nummer');
but I my location bar I see:
http://localhost/pcGebruik/files/xmlorderon.php?order_id=$order_nummer
The contents of single quotes are taken literally (with two exceptions).
echo 'the variable a holds $a'; // taken literally
echo 'it\'s a exception'; // the \' is taken as a single '
echo 'the other exception is \\ a single backslash';
So to have your header() do what you want either use double quotes
(which interpolate much more than single quotes) or concatenate the
contents of $order_nummer to the rest of the URL:
header('Location: xmlorderon.php?order_id=' . $order_nummer);
Better yet is to use urlencode() for the $order_nummer:
header('Location: xmlorderon.php?order_id=' . urlencode($order_nummer));
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--