Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really need help with this assignment. The assignment is in PHP code 1 Rewrite handle_reg.php so that it uses a variable for the current

I really need help with this assignment. The assignment is in PHP code

1 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

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

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

Submit the three modified PHP script files.

The code that i have is

Registratio

Registration Results

$okay = true;

if (empty($_POST['email'])) {

print '

Please enter your email address.

';

$okay = false;

}

if (empty($_POST['password'])) {

print '

Please enter your password.

';

$okay = false;

}

if (is_numeric($_POST['year'])) {

$age = 2017 - $_POST['year'];

} else {

print '

Please enter the year you were born as four digits.

';

$okay = false;

}

if ($okay) {

print '

You have been successfully registered(but not really).

';

print "

You will turn $age this year.

";

}

?>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Explain in detail how the Mughal Empire was established in India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I - -[ze dx

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = 1- 1 dx 9

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago