Question: Need to fix my code. Need to fix my code.

Need to fix my code.

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!