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

Need to fix my code. 10) {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
Get step-by-step solutions from verified subject matter experts
