Hello
I am not really sure how to do this what I am trying to accomplish is passing of the variable from a simple php page that calls a class that is included. Here is what I have
PHP page that calls the class and link with the variable that I want to pass
This page is called convert.php and included the variable $countryCode as follows
whatever.com?countryCode=AUD
// IF I ECHO $countryCode the variable shows up fine here
if($countryCode=='USD' || $countryCode='' || !$countryCode){
}else{
//If I try to echo $countryCode here for some reason or another it gets lost weird
include('exchange.php');
$x = new CurrencyConverter($db_host,$db_user,$db_pwd,$db_name,'currencyconvert');
// I am trying to use $countryCode in the below which send the request to exchange .php but for some reason or another the variable $country code get lost after the else statement
echo $x->convert(2.50,'USD',$countryCode);
}
Here is the top part of exchange.php I am not really sure how to get the variable to pass or even why it gets lost on the above lost statement
class CurrencyConverter {
var $xml_file = "www.ecb.int/stats/eurofxref/eurofxref-daily.xml";
var $mysql_host, $mysql_user, $mysql_pass, $mysql_db, $mysql_table;
var $exchange_rates = array();
Any Help Would be appericated
Thanks