Page 20 - Open Soource Technologies 304.indd
P. 20
Web Technologies-I
Notes <form action=”<?php $PHP_SELF; ?>” method=”post”> Enter your name: <input type=”text”
name=”name” /> <input type=”submit” />
</form>
</body>
</html>
The form and the message are shown in Figure 1.8.
Figure 1.8: Form and Greeting
1.4.3 Databases
PHP supports all the popular database systems, including MySQL, PostgreSQL, Oracle, Sybase,
and ODBC-compliant databases. Figure 1.9 shows part of a MySQL database with two tables:
actors, which assigns a unique identifier to each actor who played James Bond; and movies, which
records each movie’s name, release date, and the identifier of the Bond actor.
Figure 1.9: Contents of the Bond Tables
movies actors
id title Year actor id name
1 Dr No 1962 1 1 Sean Connery
2 From Russia With Love 1963 1 2 George Lazenby
3 Goldfinger 1964 1 3 Roger Moore
4 Thunderball 1965 1 4 Timothy Dalton
5 You Only Live Twice 1967 1 5 Pierce Brosnan
6 On Her Majesty's Secret Service 1969 2
7 Diamonds Are Forever 1971 1
8 Live and Let Die 1973 3
9 The man With The Golden Gun 1974 3
10 The Spy Who Loved Me 1977 3
11 Moonraker 1979 3
14 LOVELY PROFESSIONAL UNIVERSITY