wordpress - PHP 5.3.3 _server['query_string'] ERROR -


i'm using wordpress on php server 5.3.3 , got error when try $_server['query_string'].

my code below:

$query_string = $_server['query_string'];       if($current_user->user_nicename == "admin"){     echo '<a class="button add_to_cart_button product_type_simple" href="#" target="_blank" >lista cursos</a>';       if(isset($_get['demo'])){            if (strpos($query_string,'&demo') !== false)             $enlacesindemo = str_replace("&demo","",$query_string);       } } ?>         <a  class="button add_to_cart_button product_type_simple" href="index.php?<?= $enlacesindemo ?>" target="_self">ver todos</a> 

and got link:

index.php?<?= $query_string ?>&demo 

short_open_tags in not enabled server.

try using <?php ?> instead of <? ?>

and <?php echo $variable;?> instead of <?=$variable;?>


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -