Jump to content

y0y0y0

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

y0y0y0's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can you show me where to insert this call? Where ever I put it, I still keep getting a blank page. Thanks for the help.
  2. Hello. I am attempting to try my luck at PHP. I can not figure out how to call the function in the PHP code. I keep getting a blank page. I am using a simple html form with an input field and a submit button. When you enter in a particular letter grade, it should return a response based on their answer. Here are the bits of code. Thanks for any assistance. HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Letter Grades</title> </head> <body> <form action="LetterGrades.php" method="get" > <p> Grade: <input type="text" name="grade" /> <input type="submit" /> </p> </form> </body> </html> PHP: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Letter Grades</title> </head> <body> <?php function checkGrade($Grade) { switch ($Grade) { case "A": echo "Your grade is excellent."; break; case "B": echo "Your grade is good."; break; case "C": echo "Your grade is fair."; break; case "D": echo "You are barely passing."; break; case "F": echo "You failed."; break; default: return "You did not enter a valid letter grade."; } } ?> </body> </html>
  3. I am following a video tutorial on how to set a password for Mysql. Here are the directions it gives me but I am getting an error. I just downloaded the newest version of WAMP, so that is what im using. Yes I'm new and have never done this. Thanks for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.