gettiing a $_GET['prosupad'] value into a smarty template and test with an if statment

have a $_GET['prosupad'] value that i need to test inside a tpl template file and need to then operate on the value found, am having trouble getting the syntax correct, have tried several versions but no good has any one have any ideas
{if $_GET['prosupad'] == 'p'}   // does not work
   // do whats req
{/if}

<?php if $_GET['prosupad'] == 'category'): ?>   // does not work
         // Do fancy stuff!
<?php endif; ?>}
sydneyguyAsked:
Who is Participating?
 
honestman31Connect With a Mentor Commented:

oops , forgot the php tag

<?php if ($_GET['prosupad'] == 'category') { ?>  
       
do something here

<?php   } ?>
0
 
honestman31Commented:
<?php if ($_GET['prosupad'] == 'category') { ?>  
         
<? } ?>
0
 
honestman31Commented:
<?php if ($_GET['prosupad'] == 'category') { ?>  
       
do something here

<? } ?>
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
sydneyguyAuthor Commented:
<?php if ($_GET['prosupad'] == 'p') { ?>  
 do something here
<? } ?>

does not run causes the page to hang
0
 
honestman31Commented:
Di d you try the last one ?
also can you post what you do  , I'm afraid you are getting the script in an infinite loop
0
 
sydneyguyAuthor Commented:
almost there, template needs the <?php changed to {php} ect so got me into the ball park thanks for the help
{php} if ($_GET['prosupad'] == 'p') { {/php}  
    <input type="text" value="F" name="txtlookgender" />
{php} } {/php}
0
 
sydneyguyAuthor Commented:
slight change for tpl smarty template
0
 
sydneyguyAuthor Commented:
please close quesion and award points
0
 
honestman31Commented:
Glad I put in the right way . I was just about to tell you to replace <?Php  by {PHP}  as you are using smarty .
I think you should use accept answer not  close question .
thanks
0
 
sydneyguyAuthor Commented:
made a mistake needs to be awarded points to honestman31:
0
 
sydneyguyAuthor Commented:
done thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.