Beruflich Dokumente
Kultur Dokumente
PHP – Part 2
PICTURE
Project Website
What is this lecture about?
● Passwords
● PHP Repetition
● PHP Syntax
– Scope of variables
● Organization issues, mid term exam, …
Project Website
Passwords
● Set up of
– DB
– Samba share (again)
● Please write your
– ID +Name +
– a secret password (max. 8 characters)
on a sheet of paper and give it to me
Project Website
PHP Website – How does it work?
Project Website
PHP Hello World in HTML
Filename: index.php
Save this file and and copy it to
any PHP enabled webserver
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
echo '<p>Hello World</p>';
?>
</body>
</html>
Project Website
PHP Hello World
<html> <html>
<head> <head>
<title>PHP Test</title> <title>PHP Test</title>
</head> </head>
<body> <body>
<?php <p>Hello World</p>
echo '<p>Hello World</p>'; </body>
?> </html>
</body>
</html>
Project Website
PHP Syntax – Functions
Project Website
PHP Syntax – Functions
Project Website
Scope of Variables
Project Website
Local Scope of Variables
Project Website
Scope of Variables
Project Website
Global Scope of Variables
Project Website
$GLOBALS Array
Project Website
Superglobals
Project Website
Superglobals
Project Website
That's all
Project Website