PHP Tutorial From beginner to master - IT present
https://itpresent.com/web/tutorials/php/php_master.pdf
Pre-requisites What is PHP?What is MySQL?PHP + MySQLWhy PHP?Where to Start?What do you need?Already have a web server? Download PHPDownload MySQL DatabaseDownload Apache ServerPHP SyntaxBasic PHP SyntaxComments in PHPVariables in PHPPHP is a Loosely Typed LanguagePHP String VariablesString Variables in PHPHello World Complete PHP String ReferencePHP OperatorsPHP If...Else StatementsConditional StatementsThe if StatementSyntaxThe if...else StatementSyntaxExampleThe StatementSyntaxExamplePHP Switch StatementThe PHP Switch StatementPHP ArraysAssociative ArraysMultidimensional ArraysComplete PHP Array ReferencePHP Looping - While LoopsPHP LoopsThe while LoopThe do...while StatementThe number is 2 The number is 3 The number is 4 The number is 5 The number is 6PHP Looping - For LoopsThe for LoopSyntaxSyntaxExamplePHP Built-in FunctionsPHP FunctionsCreate a PHP FunctionSyntaxExamplePHP Functions - Adding parametersExample 1Example 2PHP Functions - Return valuesPHP Forms and User InputPHP Form HandlingExampleYou are 28 years old.Form ValidationThe $_POST Function<form action="welcome.php" method="post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> When to use method="post"?The PHP $_REQUEST FunctionExampleif (condition) code to be executed if condition is true; The following example will output "Have a nice weekend!" if the current day is Friday: <html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; ?> </body> </html> Notice that there is no ..else.. in this syntax. You tell the browser to execute some code only if the spec...See more on itpresent.comFile Size: 244KBPage Count: 28Explore furtherPHP Tutorial in PDF if (condition) code to be executed if condition is true; The following example will output "Have a nice weekend!" if the current day is Friday: <html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; ?> </body> </html> Notice that there is no ..else.. in this syntax. You tell the browser to execute some code only if the spec... File Size: 244KB Page Count: 28
if (condition) code to be executed if condition is true; The following example will output "Have a nice weekend!" if the current day is Friday: <html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; ?> </body> </html> Notice that there is no ..else.. in this syntax. You tell the browser to execute some code only if the spec...
File Size: 244KB
Page Count: 28
DA: 7 PA: 78 MOZ Rank: 48