X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   php in static page question (https://forum.x-cart.com/showthread.php?t=35650)

luxor 11-22-2007 06:53 PM

php in static page question
 
I have the following placed in a static page:

Code:

{php} if($pr=="2") echo"2";  else echo "3";
{/php}


now when i reference page , 2 is showing always.

When I type in my browser page.html?pr=3

the 2 still shows, so the url variable insertion of 3 is not effecting the variable $pr at all.

Is there a way to make this work?

Jon 11-22-2007 08:31 PM

Re: php in static page question
 
Why are you doing it in php instead of doing:

{if $smarty.get.pr eq "2}
show 2
{else}
show 3
{/if}

?


All times are GMT -8. The time now is 10:45 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.