How to set a PHP variable? -


i need set variable below on page load:

 if($_get['country'] == 'uk'){  } 

i thought

 $country=uk; 

would work, not?

orginal code checks url as: index.php?country=uk

i want perfom same, within page &

not have variable string @ end of suffix

is trying acheive?

 <?php     if((!isset($_get['country']) or ($_get['country']!='uk')))         header('location:index.php?country=uk');     //your code here 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -