![]() |
question regarding <if> in templates
I'm writing a few custom pages for my site, one of which is an email form. I have a varaible in the PHP called $sendfail which is set to 0 or 1 depending if the email sent correctly. How can i check this value using <if> in the template so i can display the relevant message? I presumed it would have been <if $sendfail == "0"> but this doesnt seem to work.
Any help would be great, thanks |
HTML Code:
<if condition="$sendfail"> |
so can i test that for a matching value like
HTML Code:
<if condition $sendfail == "0"> Do something if it was equal to zero </if> HTML Code:
<if $sentto == "The Admin Team"> do something </if> |
Yes both are correct. Since the $sendfail is a boolean, you could also just perform the test like i gave in my example above.
|
For some reason this just will not work, here's a bit of my template:
HTML Code:
<tr> |
The format is <if condition="xxxxxxx"> ....... </if>
Where xxxxxx is what you want to test - so in your example above you need ; <if condition=" $showcategory == 'Display body retailers' "> |
Nice one :D that works a treat now. Thankyou
|
All times are GMT. The time now is 06:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|