PHPiggy Bank

Developer
Size
1,693 Kb
Views
24,288

How do I make an phpiggy bank?

What is a phpiggy bank? How do you make a phpiggy bank? This script and codes were developed by Emily K on 09 September 2022, Friday.

PHPiggy Bank Previews

PHPiggy Bank - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>PHPiggy Bank</title>
</head>
<body>
<html>
<head>	<title>PHPiggy Bank</title>
<?php	# Define 4 different variables, which will each represent how much a given coin is worth	$penny_value = .01;	$nickle_value = .05;	$dime_value = .10;	$quarter_value = .25;	$half_value = .50;	# Define 4 more variables, which will each represent how many of each coin is in the bank	$pennies = 300;	$nickles = 5;	$dimes = 0;	$quarters = 125;	$half = 33;	# Add up how much money is in the piggy bank	$total = ($pennies * $penny_value) + ($nickles * $nickle_value) + ($dimes * $dime_value) + ($quarters * $quarter_value) +($half * $half_value) ;	#Define a variable $goal and set it to be 50.	$goal = 50;	#Write an if statement which will set a a variable called $image to be either php-goal-met.png or php-goal-not-met.png.	if($total > $goal) {	$image = 'php-goal-met.png';	}	else {	$image ='php-goal-not-met.png';	}	?>
</head>
<body>	<img alt='PHPiggy Bank Logo' src='https://thewc.co.s3.amazonaws.com/challenges/php-phpiggy-bank.png'>	<p> You have $<?php echo $total; ?> in your piggy bank. You have <?=$quarters?> quarters in your bank.	</p>	<p> <img src='https://thewc.co.s3.amazonaws.com/challenges/<?php echo $image; ?>' alt='Goal Status'>	</p>
</body>
</html>
</body>
</html>
PHPiggy Bank - Script Codes
PHPiggy Bank - Script Codes
Home Page Home
Developer Emily K
Username Emnk
Uploaded September 09, 2022
Rating 3
Size 1,693 Kb
Views 24,288
Do you need developer help for PHPiggy Bank?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Emily K (Emnk) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!