I am overriding the value of the variable, looks simple.
Posted: Fri Nov 14, 2008 6:57 pm
Hi, I want to give a value to a variable if a user is coming from certain link that sets the value of $currency to ".php?c=c" but if the user is not coming from that link I want the default value set to nothing, "".
With the code I have I override the value of currency when I try to set a default value.
What should I do to make it work?
With the code I have I override the value of currency when I try to set a default value.
Code: Select all
<?php
switch($_GET['c']) {
case "c":
$currency = "?c=c";
break;
default:
$currency = "";
break;
}
?>