wed Jun 20

Introduction to PHP

9 – 12h Teaching

Teacher:

  • Julien

Goals

  • I understand where PHP stands in a website.
  • I've created my first PHP page.
  • I understand basic logic and PHP, how a PHP page should be organized and how to query a database.


Useful online resources:

The PHP documentation

  • http://php.net/

The best source for answers

Slides (course and exercises)

open speakers-note (S) to copy/paste the code

PHP-matin1

12 – 13.30h Lunch

13.30 – 17h


Introduction to PHP

  • Afternoon exercise
    1. connect with phpMyAdmin to the 'test' database
    2. Register some users using your PHP application
    3. Create a table that shows :
      1. Make a pretty table .
      2. The Acronym of the user (JG for Julien Godin; note the upper first.).
      3. The name of the user, reversed (Nidog Neiluj ; note the upper first.).
      4. Input the birth date of the user, calculate his age and show it in the table.

hints :

http://php.net/manual/en/function.strtoupper.php

http://php.net/manual/en/function.substr.php

Strings are arrays of characters.

Please use your own functions.