Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need to fix my code. Need to fix my code.

Need to fix my code.

image text in transcribed

Need to fix my code. 10) {print ("HEY THERE, $charName!"); print ("

YOU SPENT MORE GOLD THAN YOU HAVE!

"); print ("

GO BACK AND TRY THAT AGAIN - YOU HAVE 10 GOLD PIECES..

")}elseif ($charType == 'elf') {$healthTokens = $_POST['healthTokens'] + 5;}elseif ($charType == 'wizard') {$expTokens = $_POST['expTokens'] + 2;}elseif ($charType == 'human' || $charType == 'dwarf') {$supplyTokens = $_POST['supplyTokens'] + 10;} $totalGold = 10; $goldLeft = $totalGold - $goldSpent; print("

You have created $charName the $charType!

"); print("

$charName has $healthTokens health tokens, $expTokens experience tokens, and $supplyTokens supply tokens.

"); print("

You received some bonus tokens!:)

"); print("

$charName has spent $goldSpent gold pieces, "); print("and has $goldLeft gold pieces left.

"); print("Return to form""); ?>

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_2

Step: 3

blur-text-image_3

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

Does each convey its message clearly enough?

Answered: 1 week ago

Question

Need to fix my code. Need to fix my code.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago