Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » if condition in php syntax required
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Return to the default flat view Create a new topic Submit Reply
if condition in php syntax required [message #186341] Thu, 03 July 2014 21:31 Go to previous message
maxinetindia is currently offline  maxinetindia
Messages: 3
Registered: July 2014
Junior Member
add to buddy list
ignore all messages by this user
I am a newbie with no knowledge of php. i have a register.php file with piece of code in ..... tag that asks for username password and other details. The country is selected automatically and the script is included in the register.php file. I dont know how to find which is the correct variable and how to write if statement. The line where the variable can be found is echo ''.$ctr['country'].'';

I want to check the country in the if statement and if the country belongs to "India", it should show the register.php file contents (between the tags, else just show a message that "We accept registration only from India"

Can someone give me the syntax how to write? I searched for it but was very confused in php tags and semicolons


if country = india
custom message
[Message index]
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to revise my User Contributed Note on php.net
Next Topic: xmltes Template Engine
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Jul 23 00:21:09 EDT 2018

Total time taken to generate the page: 0.00625 seconds