Php Tutorial

2,203 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,203
On SlideShare
0
From Embeds
0
Number of Embeds
22
Actions
Shares
0
Downloads
57
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Php Tutorial

  1. 1. Tutorial on PHP Let’s Start… Incorporating basic PHP Codes into HTML. By Stacey Spencer
  2. 2. Downloads… Before doing anything connected to PHP, you MUST have a ‘Web Server’ You MUST then download software with PHP on it. E.g. Apache A quick way to do this would be to download a ‘WampServer’ . This has PHP, Apache and MySQL.
  3. 3. HTML Files <ul><li>STEP 1: </li></ul><ul><li>Open the ‘Notepad’ programme on your PC/ Laptop </li></ul><ul><li>STEP 2: </li></ul><ul><li>- Create a basic HTML File in Notepad. </li></ul>
  4. 4. You should have THIS… <html> <head><title>Welcome To My World!</title></head> <body> <p>Welcome To My World! </body> </html> STEP 3: - save it .(name of file) file with save type file as ‘ALL FILES’
  5. 5. Open Your Browser… STEP 4: Open up the Internet and enter http://localhost/name of the file. E.g. http://localhost/.tutorial Root folder where you save files. ‘ Welcome To My World’ has appeared in my browser
  6. 6. Adding PHP Code to HTML STEP 1: Open up ‘Notepad’ STEP 2: Create a PHP code STEP 3: Save it as a .php all files document. E.G. <html> <head><title>Welcome To My World!</title></head> <body> <?php echo &quot;<p>Welcome To My World!&quot; ?> </body> </html> This is the php code.
  7. 7. You should get this… <ul><li>PHP is now in the HTML page. </li></ul><ul><li>The PHP section now looks like the HTML Program. </li></ul>
  8. 8. The End

×