Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 14th May 2015, 10:43 PM   #1
Internet Marketing Newbie
 
Join Date: 2014
Location: ARLINGTON, TX
Posts: 228
Thanks: 50
Thanked 5 Times in 5 Posts
Default
how does if then or any kind of statement work.....
Share on: 
fb share twitter share gplus share more share

IN PHP if you just wanna build a great looking website; whats the point of the statements; dont mind me im just a rookie in php so pardon my duh moment with php
TAHERSYED34 is offline  
Unread 14th May 2015, 11:22 PM   #2
Slurp, Slurp!
War Room Member
 
nmwf's Avatar
 
Join Date: 2015
Location: Sacramento, CA
Posts: 864
Thanks: 257
Thanked 236 Times in 191 Posts
Default
Re: how does if then or any kind of statement work.....
Share on: 
fb share twitter share gplus share more share

Programming statements or comments?? Programming statements are required. In fact, you can't program without them!! Not clear on what you're talking about here.

Write comprehensible articles on *any* topic in seconds with First Draft...
First Draft's: Download | Add-Ons | Templates | Purchase | Support | Affiliates
nmwf is offline  
Unread 15th May 2015, 03:39 PM   #3
Warrior Member
 
Gordon24's Avatar
 
Join Date: 2015
Location: Zrenjanin
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: how does if then or any kind of statement work.....
Share on: 
fb share twitter share gplus share more share

If you have ANY underlining logic in your website, you will probably need to use statements. Besides, PHP is very powerful programming language, and statements are literally one of the first concepts tutorials cover. The understanding of basic programming language concepts will always come in handy.
Gordon24 is offline  
Unread 24th May 2015, 03:44 AM   #4
Kim Jong-un Advisor
War Room Member
 
Cosmit's Avatar
 
Join Date: 2011
Location: The People's Republic of North Korea
Posts: 452
Thanks: 7
Thanked 68 Times in 53 Posts
Default
Re: how does if then or any kind of statement work.....
Share on: 
fb share twitter share gplus share more share

PHP Code:
if(isLoggedIn()){
    
showCommentForm();
}else{
    
showLoginForm();
} 
Any questions?
Cosmit is offline  
Unread 4th Jun 2015, 05:19 PM   #5
Active Warrior
War Room Member
 
Join Date: 2009
Location: Houston, Texas
Posts: 77
Thanks: 4
Thanked 11 Times in 10 Posts
Default
Re: how does if then or any kind of statement work.....
Share on: 
fb share twitter share gplus share more share

Taher the best way to describe it is to think of a programming language as a brain with strict rules. I can't explain these in details here but they apply to most programming languages. (try W3Schools Online Web Tutorials for more information)

One of those rules uses conditional statements which means if this then do that or this.

So if someone asks you "Do you have to go to work today?" then your brain does this very instantly, almost even without you noticing:
- Bring back today.
- Today is Sunday
- I don't work on Sunday
- So you respond no I don't have work today.

So in code it would be like:
1) First find out if you know what today is (I know sounds crazy)
today = Sunday

2) Find out if I work on Sunday
Monday = work
Tuesday = work
.....
Sunday = off

Response - I have today off. That's conditional.

In programming you can use it for lots of reasons such as:
- if the password is not correct then show "You've entered an incorrect password. Please try again".
etc.....
samntly is offline  
Closed Thread


Bookmarks

Tags
kind, statement, work


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 02:14 PM.