![]() |
quick question
hi peoples,
i've just started to learn php and decided to buy PHP a beginners guide by vikram vaswani. only up to the section about if statements switch cases etc which i understand so far. However, in the exmaple given it has put in some code which i dont understand because it has never mentioned it before. can someone please explain it to me? Thanks, rob PHP Code:
|
$_POST is what is known as a superglobal and contains what is known as post data which is ordinarily sent via form submition.
isset is a function used to check if a variable has been set or not In this case we're checking if a value has not been set for the $_POST['submit'] and if it's not preform the actions lying betwixt the brackets. |
i know what $_POST means,it was the isset i didnt understand, i should have mentioned that sorry.
so just to clarify in this example i am reading, it contains a web form, so the isset checks to see if the submit button has a value, if it hasnt it will display the web form, if it has then it will process the form? |
Actually in this instance the if statement is checking to see if the variable is not set. So if the form has not been submitted then the form will be displayed. Similar to what you said but slightly different. :)
PHP Code:
Edit: Yeah, sorry what you said, mis-read it. |
If I'm stuck with a function I Google something along the lines of "PHP Manual isset". Brings up the manual page for that function - got some very good examples for most the functions and has helped me out a great deal.
Good Luck :-) |
google links php to php manual so if you do php + <function name>.
it is the same as PHP Manual, just a tip :) also if you google, php search toolbar for firefox, there is many search toolbars for php :) so you have php manual right in your browser.... -Cf |
Quote:
|
| All times are GMT. The time now is 12:29 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0