PHP problem: Extracting a value from a query string
http://example.com/scriptname.php?email=user%40example.com&from=user%40example.com&meta_adtracking=adtrackcode&meta_message=1&name=Freddie&unit=listname&add_url=http%3A%2F%2Fexample.com%2Ffirstscript.php%3Fpage%3D678&add_notes=256.0.0.7&custom%20ref=678
I am attempting to extract that last value (678) from the query string, using this bit of code:
<?php
error_reporting (E_ALL ^ E_NOTICE);
$default = 1;
$value = $_GET['custom ref'];
if($value != "") {
$newvalue = $_GET['custom ref'];
} else {
$newvalue = $default;
}
?> What am I screwing up?
Paul
Stop by Paul's Pub - my little hangout on Facebook.
"Be Still Like A Mountain And Flow Like A Great River"
Stop by Paul's Pub - my little hangout on Facebook.
Stop by Paul's Pub - my little hangout on Facebook.