Programming, Databases and the Web with HTML, PHP - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Programming, Databases and the Web with HTML, PHP

Description:

Make our BTEC more Internet related. Use a single programming language for the web and also ... NOT Strongly Typed - oops! function nfact($n) { if ($n ... – PowerPoint PPT presentation

Number of Views:126
Avg rating:3.0/5.0
Slides: 24
Provided by: cnba
Category:

less

Transcript and Presenter's Notes

Title: Programming, Databases and the Web with HTML, PHP


1
Programming, Databases and the WebwithHTML, PHP
MySQL
  • Tools for the Broadband Age
  • Neil Bauers
  • nbauers_at_samphire.demon.co.uk
  • www.SoftwareForEducation.com

2
Aims
  • Make our BTEC more Internet related.
  • Use a single programming language for the web and
    also beginners' programming units.
  • Use free, small, simple well documented software.
  • Learn how simple e-commerce web based
    applications work.

3
Nearly doubled since 2000 Still only 11 of
world population
4
Broadband
5
Landmark Moments
  • 1976 - We've got a computer
  • 1984 - We've got a computer room
  • 1988 - We've got a network
  • 1992 - We've got the Internet
  • 1995 - Most students have a computer
  • 2000 - Most students have the Internet
  • 2007 - Most students have server technology

6
Operating Systems
  • Student servers are using
  • Linux Apache web server
  • Free BSD Apache web server
  • Windows XP Home Apache web server
  • Windows XP Pro IIS
  • Windows 2000 Pro IIS
  • Windows 98 PWS (rather limited - not
    recommended)

7
Compatible Software
  • What runs on all these operating systems?
  • HTML for web page authoring
  • PHP for scripts that run on the server
  • MySQL for web accessible databases
  • Java? Tomcat for JSP (Linux only?)

8
My Colleges Response
  • Give the students a real Web Server
  • Server-side PHP to make pages 'dynamic'
  • Server runs SuSE Linux 8.1 Apache
  • 1GHz Duron 256MB RAM
  • 100 users
  • E-Business and Media students use it too
  • The server is restricted to our Intranet

9
Learning Curve Stage 1
  • Set up a Web Server ask a student how!
  • Install Linux
  • Get Apache working
  • Get FTP working (vsftpd is best)
  • Create users
  • Students learn HTML and make web pages
  • FTP their pages to the server

10
Learning Curve Stage 2
  • Get PHP working - ask a student how!
  • With Linux it's probably working already!
  • Students add PHP to their HTML
  • Save the files as "foo.php" (not "foo.htm")
  • Load the pages from the server (not the local
    disk)

11
  • PHP is FREE
  • Runs on Windows and Linux
  • Fairly easy to learn and well documented
  • Command line and server-side scripts possible
  • Lots of example code on the web
  • http//www.php.net/

lt?php echo "Hello World!" ?gt
12
lt?php // NOT Strongly Typed - oops! function
nfact(n) if (n 0) return 1
else return n nfact(n - 1) ?gt
13
lt!-- index.php --gt lthtmlgt ltbodygt lt?php echo
"lth1gtHello World!lt/h1gt\n" ?gt lt/bodygt lt/htmlgt
14
PHP on the WEB
  • Programs look good web graphics too
  • Work on any platform (with a browser)
  • Available to 700 000 000 Internet users
  • Motivates students to code better
  • Link website and programming BTEC units
  • Write e-commerce applications
  • Up to date - business related - not too hard

15
(No Transcript)
16
(No Transcript)
17
PHP Talks to MySQL
lt?php result mysql_query("SELECT
my_col FROM my_tbl") or
die("Invalid query " .
mysql_error()) ?gt
18
Learning Curve Stage 3
  • Get SSH working - ask a student how!
  • Download PuTTY (a secure 'telnet' shell)
  • http//www.chiark.greenend.org.uk/sgtatham/putty/
  • Use PuTTY to log into the Linux box
  • SSH already works on our Linux
  • Students can learn the Unix command line
  • Use this shell to run the MySQL monitor

19
Learning Curve Stage 4
  • Get MySQL working - ask a student how!
  • With SuSE 8.1 you need to turn it on
  • Log in using PuTTY
  • Run MySQL (it is multi-user for simultaneous
    whole class use)
  • Use SQL with both DDL and DML

20
(No Transcript)
21
Configuration Files
  • Two files need to be edited
  • /etc/httpd/httpd.conf
  • /etc/vsftpd.conf
  • There are examples of these onhttp//www.Softwar
    eForEducation.com

22
  • FREE RESOURCES
  • http//www.SoftwareForEducation.com
  • http//www.suse.co.uk/uk/index.html
  • http//www.freebsd.org/
  • http//httpd.apache.org/
  • http//vsftpd.beasts.org/ (upgrade is
    better)
  • http//www.chiark.greenend.org.uk/sgtatham/putty/
  • http//www.php.net/downloads.php
  • http//www.mysql.com/
  • http//www.w3schools.com/ (good tutorials)
  • nbauers_at_samphire.demon.co.uk (for help)

23
The End
  • Learn More - Google Search String
  • LAMP Linux Apache php mysql
  • L Linux
  • A Apache
  • M MySQL
  • P PHP
Write a Comment
User Comments (0)
About PowerShow.com