ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 8.00

control structures by modifying a PHP script

PHP

1.

Let’s practice working with control structures by modifying a PHP script. In Chapter 6 of our textbook we use the handle_reg.php file to demonstrate the use of if, switch, and loop statements. After working with the examples in the chapter, modify the handle_reg.php to do the following:

Rewrite handle_reg.php so that it uses a variable for the current year, instead of hard-coding that value. Name your file handle_reg_1.php

For debugging purposes, add code to the beginning of the handle_reg.php script that prints out the values of the received variables. Hint: There’s a short and a long way to do this. Name your file handle_reg_2.php

Update handle_reg.php so that it validates the user’s birthday by looking at the three individual form elements: month, day, and year. Create a variable that represents the user’s birthday in the format XX/DD/YYYY. Hint: You’ll have to use concatenation. Name your file handle_reg_3.php

handle_reg.php

<!doctype html>

 

<html lang="en">

 

<head>

 

<meta charset="utf-8">

 

<title>Registration</title>

 

</head>

 

<body>

 

<h1>Registration Results</h1>

2.

It’s time to get some practice working with PHP scripts. This assignment consists of 3 parts:

Installing the required software

Creating a PHP template

Writing a simple PHP script

Part 1:

Unlike HTML, which can be tested directly in a browser, PHP scripts need to be run from a PHP-enabled server in order to see the results. The three technical requirements for executing PHP scripts are PHP (the scripting language), the web server application that PHP runs through, and MySQL (the database application).

We will use a one-in-all installer called XAMPP that cover all our technical requirements. The instructions for installing XAMPP are in the Appendix A: Installation and Configuration. Follow the instructions to install XAMPP on your computer.

What do I submit for part 1? Submit a screenshot of the XAMPP console running on your computer. You can submit the screenshot as an image file or paste it in a Word document. Name the file: Part 1 XAMPP Installation.

Part 2:

Since you’ll be writing a lot of scripts in this course, it’s a good idea to create a PHP template to help you get started with your scripts. The template should contain the HTML shell, the opening and closing PHP tags, and some basic comments.

What do I submit for part 2? Submit your PHP template with the name of mytemplate.php

Part 3:

Let’s get some practice creating a PHP script. Write a php script that uses variables to store and display the following: your first name, last name, field of study, favorite number, and today’s date.

What do I submit for part 3? Submit your php file with the name of variablepractice.php

Answers

(11)
Status NEW Posted 28 Apr 2017 05:04 AM My Price 8.00

-----------

Not Rated(0)