0% found this document useful (0 votes)
12 views

Tutorial-4-Server-side-scripting Languages

Uploaded by

chennoufiselma31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Tutorial-4-Server-side-scripting Languages

Uploaded by

chennoufiselma31
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

University of frères Mentouri M2: Network and Telecommunications

Faculty of Science and Technology Cours of Web Technologies


Department of Electronics Academic year: 2023-2024

TUTORIAL#4 – SERVER-SIDE SCRIPTING LANGUAGES


Questions: Answers, in your own words, to the following questions.
1. Explain what server-side scripting is?
2. Give four examples of the most popular server-side scripting languages and frameworks.
3. What is the difference between server-side and client-side?
4. Is PHP a case sensitive language?
5. What are the different types of PHP variables?
6. How to concatenate two strings in PHP?
7. How can PHP and HTML interact?
8. What is the difference between single quoted string and double quoted string?
Exercise 01: Build a PHP page that displays the current date (Year-Month-Day), time (Hour:Minutes:Seconds),
and a greeting based on the time of the day.
▪ Greeting « Good Morning » if current hour is in [5, 12[.
▪ Greeting « Good afternoon» if current hour is in [12, 18[.
▪ Greeting « Good evening» if current hour is >=18.
Exercise 02: Build a PHP page that reads a sample array of numbers, use functions to perform the following
basic operations on the array and display the results:
▪ Function to calculate the sum of an array of numbers.
▪ Function to find the average of an array of numbers.
▪ Function to find the highest number in the array.
▪ Function to find the number of occurrences of a specific number in the array.
Exercise 03: PHP and MySQL
1) Use PhpMyAdmin to create MySQL database named “contact”, which consist of one table named
“Contact-form” that stores information about the username, his email and message.
2) Create a simple HTML form named “index.html” with the fields shown in the figure below:

3) Create the PHP script, named “process_form.php” to handle the form submission and insert data into
the MySQL database “contact”.

1|Page

You might also like