PHP Manual Online Overview

PHP Manual Online Overview
Slide Note
Embed
Share

PHP is a server-side scripting system that stands for "PHP: Hypertext Preprocessor". It is very good for creating dynamic content on web pages. PHP files typically end in .php and are separated by the tags. PHP commands can make up an entire file or be contained within HTML. You can embed PHP sections inside HTML or call HTML from PHP files to create dynamic web pages. HTML, on the other hand, is the standard markup language for creating web pages and describes the structure of web content using elements (tags). Browsers render the content of HTML pages based on the markup provided.

  • PHP Manual Online
  • Server-side Scripting
  • Dynamic Content Creation
  • Web Development

Uploaded on Mar 06, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Most of this is from the PHP manual online at: http://www.php.net/manual/

  2. What is client-server architecture? What is client side scripting? What is server side scripting?

  3. PHP is server side scripting system PHP stands for "PHP: Hypertext Preprocessor" Syntax based on Perl, Java, and C Very good for creating dynamic content If you want to focus on one system for dynamic content, this is a good one to choose

  4. Typically file ends in .php--this is set by the web server configuration Separated in files with the <?php ?> tag php commands can make up an entire file, or can be contained in html--this is a choice . Program lines end in ";" or you get an error Server recognizes embedded script and executes Result is passed to browser, source isn't visible <P> <?php $myvar = "Hello World!"; echo $myvar; ?> </P>

  5. You can embed sections of php inside html: <BODY> <P> <?php $myvar = "Hello World!"; echo $myvar; </BODY> Or you can call html from php: <?php echo "<html><head><title>Howdy</title> ?>

  6. HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language HTML describes the structure of Web pages using markup HTML elements (tags) are the building blocks of HTML pages HTML tags label pieces of content such as "heading", "paragraph", "table", and so on Browsers do not display the HTML tags, but use them to render the content of the page

  7. Tags! <tagname>content goes here...</tagname> HTML tags normally come in pairs: <p> and </p> The first tag in a pair is the start tag, the second tag is the end tag The end tag is written like the start tag, but with a forward slash inserted before the tag name

  8. <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> Try it!

  9. Headings <h1>, <h2>, etc New Paragraph <P> and line breaks <br> Links <a href= link.html >My Link</a> Images <img src= myimage.jpg > Lists <ul><li>list item 1<li>list item 2</ul> Formatting Center, bold <b>, italic <i>, underline <i> Tables <table><tr><td>table thing </td><td>other thing</td></tr></table>

  10. <form action=action.php method=post> Username: <input type= text name= uname > <br> Password: <input type= text name= uname > <p> <input type= submit name= submit > </form> Other types: radio buttons, checkboxes, dropdown lists Try it!

  11. No need for formal declaration Just use as needed in the code but be sure to keep your variable names distinct Typed by context (but one can force type), so it's loose Begin with "$" (unlike javascript!) Assigned by value $foo = "Bob"; $bar = $foo; 00

  12. Arithmetic (+, -, *, /, %) and String (.) Assignment (=) and combined assignment Quantitative $a = 3; $a += 5; // sets $a to 8; $var = $var 4; $blah = $var / 5; Qualitative (strings) $b = "Hello ; $b .= "There!"; // sets $b to "Hello There! ; $q = Malcolm, .$b // sets $q to Malcolm, Hello There! Comparison (==, ===, !=, <, >, <=, >=)

  13. Wide Variety available if, else While (test before), do-while (test after) Flexible looping for(set; condition; increment) for auto incrementing loops With all of these structures, one line of code inside means you don t need {brackets}. With multiple lines of code, you need brackets

  14. Special way to use data sent from webpage $_POST[ variable name ] The first part ($_POST) must be typed exactly that way with capitalized word and underscore The variable name inside the brackets is the name of the field you provided in the HTML form.

  15. Use echo command Can display static strings echo Please enter your name: Can also display variables echo $mycount; Or both! echo Your count is .$mycount; All display items are sent back to the web server so you should use HTML for formatting

More Related Content