Forum Moderators: coopster

Message Too Old, No Replies

i think register globals broke my line of code

can someone pls take a quick look and advise

         

marcus76

7:30 am on Mar 26, 2007 (gmt 0)

10+ Year Member



Hi,

I have the following line of code, having recently moved web hosts i notice it does not work now. The host i moved to has the register globals=off setting in place. I'd really appreciate some help on what this code should be changed to.

<?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $REMOTE_ADDR)) . '.gif', geoip_country_name_by_addr($gi, $REMOTE_ADDR));?>&nbsp;
<?php echo geoip_country_name_by_addr($gi, $REMOTE_ADDR);?>

Anyone an idea?

Kind Regards

Marc

mcibor

7:41 am on Mar 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know where the $gi comes from. It could be
$_POST['gi']
or
$_GET['gi']

<?php
echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($_POST['gi'], $_SERVER['REMOTE_ADDR'])) . '.gif', geoip_country_name_by_addr($_POST['gi'], $_SERVER['REMOTE_ADDR']));
?>&nbsp;
<?php echo geoip_country_name_by_addr($_POST['gi'], $_SERVER['REMOTE_ADDR']);?>

Hope this helps
Michal

[edited by: eelixduppy at 11:17 am (utc) on Mar. 26, 2007]
[edit reason] fixed formatting [/edit]