IT 230 Saudi Electronic University PHP Program Web Tecnologies Question

Question Description

Q1: Write a PHP program to count the number of even and odd elements for the given array (2, 3, 4, 5, 6)

Q2: Write HTML and PHP code to create a Form similar to the one in the picture.

When the user press submit, the content will be sent to “Register.php”.

In Register.php document, if the user clicks submit and the checkbox has been selected, display the first name and last name as following.

However, if the user clicks submit and the checkbox has not been selected the following result will be shown.

Q3:You have the following HTML page that contains an input field for the user to enter his/her Email and a submit button:

<html>

<body>

<form action=”process.php” method=”post”>

Enter your Email: <input type=”text” name=”Email”><br/>

<input type=”submit”>

</form>

</body>

The source code for process.php page is below. The page is simply displays the entered email.

echo $_POST[“Email”];

Suppose that an attacker types the following into the Email field:

  • What will happen? [0.5 mark]
  • What do we call this type of attack? [0.5 mark]
  • Re-write process.php so, it prevents this attack.[0.5 mark]

Q4:Create a MySQL database table named Employees as the following.

Write a PHP page that retrieves all employees’ First_name and Last_name who work in IT department.

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now