Intro to PHP.ppt - Important • Please use the following site to test your Php codes(as of this moment • http/codepad.org •->and select Php •->

Intro to PHP.ppt - Important • Please use the following...

  • No School
  • AA 1
  • 62

This preview shows page 1 - 17 out of 62 pages.

Important! Please use the following site to test your Php codes (as of this moment). ->and select Php -> write the codes on the text area provided , the click submit
Image of page 1

Subscribe to view the full document.

Image of page 2
Image of page 3

Subscribe to view the full document.

Learning PHP
Image of page 4
Drawbacks of HTML HTML only allows for creating static web pages, or web pages that do not change It does not, by itself, provide a way for users to interact
Image of page 5

Subscribe to view the full document.

Learning PHP PHP is a powerful server-side scripting language for creating dynamic and interactive websites. PHP is the widely-used and free. PHP is perfectly suited for Web development and can be embedded directly into the HTML code. The PHP syntax is very similar to C. PHP is often used together with Apache (web server) on various operating systems.
Image of page 6
Introduction to PHP A PHP file may contain text, HTML tags and scripts. Scripts in a PHP file are executed on the server.
Image of page 7

Subscribe to view the full document.

How PHP Works When a user navigates in her browser to a page that ends with a .php extension, the request is sent to a web server, which directs the request to the PHP interpreter. As shown in the diagram above, the PHP interpreter processes the page, communicating with file systems, databases, and email servers as necessary, and then delivers a web page to the web server to return to the browser.
Image of page 8
What You Should Already Know Before you continue you should have a basic understanding of the following: HTML / XHTML Some scripting knowledge
Image of page 9

Subscribe to view the full document.

What is PHP? PHP stands for P HP: H ypertext P reprocessor PHP is a server-side scripting language PHP scripts are executed on the server PHP supports many databases (MySQL, etc.) PHP is an open source software PHP is free to download and use
Image of page 10
What is a PHP File? PHP files may contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML PHP files have a file extension of ".php", ".php3", or ".phtml"
Image of page 11

Subscribe to view the full document.

Why PHP? PHP runs on different platforms (Windows, Linux, Unix, etc.) PHP is compatible with almost all servers used today (Apache, etc.) PHP is FREE to download from the official PHP resource: PHP is easy to learn and runs efficiently on the server side
Image of page 12
Where to Start? Install an Apache server on a Windows or Linux machine Install PHP on a Windows or Linux machine Install MySQL on a Windows or Linux machine Or you can install XAMMP or WAMP
Image of page 13

Subscribe to view the full document.

Setup and installation of XAMPP Download XAMPP for your operating system from: If you are using Windows, just run the installer (disable proxies) If you are using Linux, untar the package to the appropriate directory and run: /opt/lampp/lampp start
Image of page 14
How do you make a PHP program? The process is identical to how you make an HTML page, even if you use a visual tool like Dreamweaver Create an HTML page in any editor (even notepad will work) Add PHP code to the page Save in your webserver directory opt\lampp\htdocs – in Linux /wamp/www – when using wampserver C:\Program Files\xampp\htdocs – in Windows View in any web browser
Image of page 15

Subscribe to view the full document.

PHP Syntax
Image of page 16
Image of page 17
  • Fall '19
  • php codes

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes