Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Future Value Calculator Future Value Calculator

/* Here's a good place to use the null coalescing operator

to test the $investment, $interest_rate, $years

to see if they have any values, and set to null otherwise.

This is because this page will be loaded the very first time

when these variables have never been used before (no values yet),

as well as when there have been errors detected and the page

is reloaded. No way of knowing unless you test the variables.

What kind of test? If you attempt to assign $investment to $investment (yup, you read that correctly--assign it to itself!), and if it's not set, assign it a NULL. Then, it won't be considered "undefined" when you attempt to print it later in the form. But, interestingly, if the user doesn't enter anything for it, and you attempt to post $investment to the next page (display_results.php), it will be considered an empty string and will pass that test next time. Whew!

*/

?>

Future Value Calculator

Future Value Calculator

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

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions