Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in C:\Xampp\htdocs\webtech\coursework\chapter07\game-intro.php on line 47
1 <html> 2 <head> 3 <title>gameIntro</title> 4 <link rel ="stylesheet" type="text/css" href="sample.css"> 5 </head> 6 <body> 7 8 <?php 9 10 $charName = $_POST['charName']; 11 $charType = $_POST['charType']; 12 $healthTokens = $_POST['healthTokens']; 13 $expTokens = $_POST['expTokens']; 14 $supplyTokens = $_POST['supplyTokens']; 15 $userPassword = $_POST['userPassword']; 16 17 $userPassword = strtolower($userPassword); 18 19 $goldSpent = $healthTokens / 10 + $expTokens / 2 + $supplyTokens / 25; 20 21 if ($userPassword == "php123") 22 23 { 24 print("<h1>You have created $charName the $charType!</h1>"); 25 print("<p>$charName has $healthTokens health tokens, 26 $expTokens experience tokens, and 27 $supplyTokens supply tokens.</p>"); 28 print("<p>$charName has spent $goldSpent gold pieces.</p>"); 29 } 30 31 else 32 33 print("<p>Sorry! That password is NOT correct! Please try again.</p>); 34 35 ?> 36 37 </body> 38 </html>
EOF
print("<p>Sorry! That password is NOT correct! Please try again.</p>);
print("<p>Sorry! That password is NOT correct! Please try again.</p>"); // pay attention to the double quote here ^
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)