Jump to content

geekette

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Female

geekette's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i'm trying to do it without using <br /> so no idea why \n won't work. Meh, I'll ask the instructor. Thanks anyways!
  2. opps..i should have been more specific..sorry, it's late. How do i break the 2 lines? shouldn't \n break the echo statements?
  3. Hi, I'm having trouble with the following code. Could someone please let me know what I'm doing wrong? Thanks! <?php $email = 'name@myemail.com' ; $name = 'First Last' ; echo "My email address is $email \n My name is $name" ; ?>
  4. Nevermind, I realized why the input text field wasn't showing up. Syntax error--I was missing a quote. However, the emails won't go through. It echo's "mail failed."
  5. When I replaced what I had to the following: <form action="email.php" method="get> <Input type="Text" size="30" name="email"> <p><input type="submit" value="Confirm" /></p> </form> the field didn't show up. however, when I had it the way I did before, the text field would be there, though, the email still echoed fail after correcting the $to field.
  6. yea, regarding that...how do I get it so that the $to connects to the <input text> field in the other .php file? The email basically will be sent to whatever email address the user inputs.
  7. So basically what I'm trying to do is create an <input> text field at the end of the revieworder.php file, where the user puts their email address, hits confirm, and then an automated email message gets sent to them. unfortunately, I keep receiving the "mail failed" echo. I probably don't have the correct code, but any help would be appreciated! I've also included the .html and .css files as a background reference: .html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title> Princess Cupcakes </title> </head> <body> <link rel="stylesheet" href="phpcssstyle.css" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <h1>Princess Cupcakes<h1 /> <hr> <hr /> <h2>Warming hearts one cupcake at a time.</h2> <br> <h3>All cupcakes are $2.50 each unless otherwise noted. Please allow at least 20 minutes between order and pickup time.</h3> <br /> <hr> <hr /> <ul><b> <li>Pink Princess: Strawberry cupcake with a strawberry whipped cream frosting <li> Swan Princess: Vanilla cupcake with lemon buttercream frosting <li>Prince Charming: Chocolate cupcake with a raspberry buttercream frosting <li>Royal Crown: Red velvet cupcake with cheesecake frosting <li>The Nutty Jester: Nutella filled cupcake, with a nutella buttercream frosting <li>Pumpkin Carriage: Pumpkin cupcake with a pumpkin whipped cream frosting <li>Princess Diaries: Blueberry cupcake with blueberry whipped cream frosting <li>Tropical Princess: Mango and banana cupcake with a strawberry whipped cream frosting <li>Career Princess: Vanilla cake with dark chocolate buttercream frosting </b> <br> <br> <br /> <h3>Order your cupcakes here. For quantities over 5 per type of cupcake, please call us: <form action="ReviewOrder.php" method="get"> <p><b>Pink Princess</b></p> <p><input type="radio" name="pp" value="0" />Zero<br /> <input type="radio" name="pp" value="1" />One<br /> <input type="radio" name="pp" value="2" />Two <br /> <input type="radio" name="pp" value="3" />Three<br /> <input type="radio" name="pp" value="4" />Four<br /> <input type="radio" name="pp" value="5" />Five</p> <br> <p><b>Swan Princess</b></p> <p><input type="radio" name="sp" value="0" />Zero<br /> <input type="radio" name="sp" value="1" />One<br /> <input type="radio" name="sp" value="2" />Two<br /> <input type="radio" name="sp" value="3" />Three<br /> <input type="radio" name="sp" value="4" />Four<br /> <input type="radio" name="sp" value="5" />Five</p> <br> <p><b>Prince Charming</b></p> <p><input type="radio" name="pc" value="0" />Zero<br /> <input type="radio" name="pc" value="1" />One<br /> <input type="radio" name="pc" value="2" />Two<br /> <input type="radio" name="pc" value="3" />Three<br /> <input type="radio" name="pc" value="4" />Four<br /> <input type="radio" name="pc" value="5" />Five</p> <br> <p><b>Royal Crown</b></p> <p><input type="radio" name="rc" value="0" />Zero<br /> <input type="radio" name="rc" value="1" />One<br /> <input type="radio" name="rc" value="2" />Two<br /> <input type="radio" name="rc" value="3" />Three<br /> <input type="radio" name="rc" value="4" />Four<br /> <input type="radio" name="rc" value="5" />Five</p> <br> <p><b>The Nutty Jester</b></p> <p><input type="radio" name="nj" value="0" />Zero<br /> <input type="radio" name="nj" value="1" />One<br /> <input type="radio" name="nj" value="2" />Two<br /> <input type="radio" name="nj" value="3" />Three<br /> <input type="radio" name="nj" value="4" />Four<br /> <input type="radio" name="nj" value="5" />Five</p> <br> <p><b>Pumpkin Carriage</b></p> <p><input type="radio" name="pkc" value="0" />Zero<br /> <input type="radio" name="pkc" value="1" />One<br /> <input type="radio" name="pkc" value="2" />Two<br /> <input type="radio" name="pkc" value="3" />Three<br /> <input type="radio" name="pkc" value="4" />Four<br /> <input type="radio" name="pkc" value="5" />Five</p> <br> <p><b>Princess Diaries</b></p> <p><input type="radio" name="pd" value="0" />Zero<br /> <input type="radio" name="pd" value="1" />One<br /> <input type="radio" name="pd" value="2" />Two<br /> <input type="radio" name="pd" value="3" />Three<br /> <input type="radio" name="pd" value="4" />Four<br /> <input type="radio" name="pd" value="5" />Five</p> <br> <p><b>Tropical Princess</b></p> <p><input type="radio" name="tp" value="0" />Zero<br /> <input type="radio" name="tp" value="1" />One<br /> <input type="radio" name="tp" value="2" />Two<br /> <input type="radio" name="tp" value="3" />Three<br /> <input type="radio" name="tp" value="4" />Four<br /> <input type="radio" name="tp" value="5" />Five</p> <br> <p><b>Career Princess</b></p> <p><input type="radio" name="cp" value="0" />Zero<br /> <input type="radio" name="cp" value="1" />One<br /> <input type="radio" name="cp" value="2" />Two<br /> <input type="radio" name="cp" value="3" />Three<br /> <input type="radio" name="cp" value="4" />Four<br /> <input type="radio" name="cp" value="5" />Five</p> <br> <br> <p><input type="submit" value="Okay" /></p> </form> <body /> <html /> .css file body { color: white; background: pink; margin-bottom: 6ex; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } h1 { color: #039; background: pink; margin-bottom: 2ex; } h2, h3, h4, h5, h6 { color: #039; } table { margin-right: auto; margin-bottom: 2ex; } thead td, th { color: black; background: #cccccc; font-size: smaller; font-weight: bold; text-align: center; padding: 0.5em 1ex; border: 1pt solid gray; } tbody td, td { color: black; background: #eeeeee; font-size: small; padding: 0.5em 1ex; border: 1pt solid gray; } pre { color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } this is the .php that connects to the .html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Review Order</title> </head> <body> <link rel="stylesheet" href="phpcssstyle.css" type="text/css" /> <h1>Review Order</h1> <?php function reviewpp ( ) { echo "<p>Pink Princess: ", $_GET [ "pp" ]; if ($_GET["pp"] == "0") echo " (Zero)</p>"; if ($_GET["pp"] == "1") echo " (One)</p>"; if ($_GET["pp"] == "2") echo " (Two)</p>"; if ($_GET["pp"] == "3") echo " (Three)</p>"; if ($_GET["pp"] == "4") echo " (Four)</p>"; if ($_GET["pp"] == "5") echo " (Five)</p>"; } function reviewsp ( ) { echo "<p>Swan Princess: ", $_GET [ "sp" ]; if ($_GET["sp"] == "0") echo " (Zero)</p>"; if ($_GET["sp"] == "1") echo " (One)</p>"; if ($_GET["sp"] == "2") echo " (Two)</p>"; if ($_GET["sp"] == "3") echo " (Three)</p>"; if ($_GET["sp"] == "4") echo " (Four)</p>"; if ($_GET["sp"] == "5") echo " (Five)</p>"; } function reviewpc ( ) { echo "<p>Prince Charming: ", $_GET [ "pc" ]; if ($_GET["pc"] == "0") echo " (Zero)</p>"; if ($_GET["pc"] == "1") echo " (One)</p>"; if ($_GET["pc"] == "2") echo " (Two)</p>"; if ($_GET["pc"] == "3") echo " (Three)</p>"; if ($_GET["pc"] == "4") echo " (Four)</p>"; if ($_GET["pc"] == "5") echo " (Five)</p>"; } function reviewrc ( ) { echo "<p>Royal Crown: ", $_GET [ "rc" ]; if ($_GET["rc"] == "0") echo " (Zero)</p>"; if ($_GET["rc"] == "1") echo " (One)</p>"; if ($_GET["rc"] == "2") echo " (Two)</p>"; if ($_GET["rc"] == "3") echo " (Three)</p>"; if ($_GET["rc"] == "4") echo " (Four)</p>"; if ($_GET["rc"] == "5") echo " (Five)</p>"; } function reviewnj ( ) { echo "<p>The Nutty Jester: ", $_GET [ "nj" ]; if ($_GET["nj"] == "0") echo " (Zero)</p>"; if ($_GET["nj"] == "1") echo " (One)</p>"; if ($_GET["nj"] == "2") echo " (Two)</p>"; if ($_GET["nj"] == "3") echo " (Three)</p>"; if ($_GET["nj"] == "4") echo " (Four)</p>"; if ($_GET["nj"] == "5") echo " (Five)</p>"; } function reviewpkc ( ) { echo "<p>Pumpkin Carriage: ", $_GET [ "pkc" ]; if ($_GET["pkc"] == "0") echo " (Zero)</p>"; if ($_GET["pkc"] == "1") echo " (One)</p>"; if ($_GET["pkc"] == "2") echo " (Two)</p>"; if ($_GET["pkc"] == "3") echo " (Three)</p>"; if ($_GET["pkc"] == "4") echo " (Four)</p>"; if ($_GET["pkc"] == "5") echo " (Five)</p>"; } function reviewpd ( ) { echo "<p>Princess Diaries: ", $_GET [ "pd" ]; if ($_GET["pd"] == "0") echo " (Zero)</p>"; if ($_GET["pd"] == "1") echo " (One)</p>"; if ($_GET["pd"] == "2") echo " (Two)</p>"; if ($_GET["pd"] == "3") echo " (Three)</p>"; if ($_GET["pd"] == "4") echo " (Four)</p>"; if ($_GET["pd"] == "5") echo " (Five)</p>"; } function reviewtp ( ) { echo "<p>Tropical Princess: ", $_GET [ "tp" ]; if ($_GET["tp"] == "0") echo " (Zero)</p>"; if ($_GET["tp"] == "1") echo " (One)</p>"; if ($_GET["tp"] == "2") echo " (Two)</p>"; if ($_GET["tp"] == "3") echo " (Three)</p>"; if ($_GET["tp"] == "4") echo " (Four)</p>"; if ($_GET["tp"] == "5") echo " (Five)</p>"; } function reviewcp ( ) { echo "<p>Career Princess: ", $_GET [ "cp" ]; if ($_GET["cp"] == "0") echo " (Zero)</p>"; if ($_GET["cp"] == "1") echo " (One)</p>"; if ($_GET["cp"] == "2") echo " (Two)</p>"; if ($_GET["cp"] == "3") echo " (Three)</p>"; if ($_GET["cp"] == "4") echo " (Four)</p>"; if ($_GET["cp"] == "5") echo " (Five)</p>"; } reviewpp ( ); reviewsp ( ); reviewpc ( ); reviewrc( ); reviewnj ( ); reviewpkc ( ); reviewpd ( ); reviewtp ( ); reviewcp ( ); ?> Please enter your email address below and we will send you a confirmation email shortly. If you do not receive a confirmation email, please call us.: <Input type="Text" size="30"> <form action="email.php" method="get> <Input type="Text" size="30"> <p><input type="submit" value="Confirm" /></p> </body> </html> the following is the email script, also a .php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Princess Cupcakes Review Order Email Confirm</title> </head> <body> <link rel="stylesheet" href="phpcssstyle.css" type="text/css" /> <?php $to = $subject = 'Princess Cupcakes'; $message = "Thank you for your order. We will have them ready shortly."; $headers = "From: dessertfiend@gmail.com\r\nReply-To: dessertfiend@gmail.com"; $mail_sent = @mail( $to, $subject, $message, $headers ); echo $mail_sent ? "Mail sent" : "Mail failed"; ?> </body> </html>
  8. Yayy!! I figured it out! The reason why it wasn't working was because I wasn't opening the file through localhost i hate when little things like that can affect how a program is run.
  9. a friend just ran it..works fine on his computer and shows up like so: http://obsidian.stanford.edu/samihah/ReviewOrder.php?pp=1&sp=2&pc=2&rc=4&nj=0&pkc=1&pd=0&tp=5&cp=3 unfortunately, it doesn't look like that for me. Does anyone know how to connect a <form> input field to php so that once someone enters their email address, an email will automatically be sent to them confirming their order?
  10. I don't think I have an extra " i just looked through it...i hate it when my programs don't render correctly!
  11. Nevermind, I did not figure it out. I thought it was because I didn't have xampp running, but I do. I'm running this from my hard drive, but I do have php installed
  12. actually you know what?...i think i figured it out...
  13. This is what it looks like on my browser: Review Order Pink Princess: ", $_GET [ "pp" ]; if ($_GET["pp"] == "0") echo " (Zero)"; if ($_GET["pp"] == "1") echo " (One)"; if ($_GET["pp"] == "2") echo " (Two)"; if ($_GET["pp"] == "3") echo " (Three)"; if ($_GET["pp"] == "4") echo " (Four)"; if ($_GET["pp"] == "5") echo " (Five)"; } function reviewsp ( ) { echo " Swan Princess: ", $_GET [ "sp" ]; if ($_GET["sp"] == "0") echo " (Zero) "; if ($_GET["sp"] == "1") echo " (One)"; if ($_GET["sp"] == "2") echo " (Two)"; if ($_GET["sp"] == "3") echo " (Three)"; if ($_GET["sp"] == "4") echo " (Four)"; if ($_GET["sp"] == "5") echo " (Five)"; } function reviewpc ( ) { echo " Prince Charming: ", $_GET [ "pc" ]; if ($_GET["pc"] == "0") echo " (Zero) "; if ($_GET["pc"] == "1") echo " (One)"; if ($_GET["pc"] == "2") echo " (Two)"; if ($_GET["pc"] == "3") echo " (Three)"; if ($_GET["pc"] == "4") echo " (Four)"; if ($_GET["pc"] == "5") echo " (Five)"; } function reviewrc ( ) { echo " Royal Crown: ", $_GET [ "rc" ]; if ($_GET["rc"] == "0") echo " (Zero) "; if ($_GET["rc"] == "1") echo " (One)"; if ($_GET["rc"] == "2") echo " (Two)"; if ($_GET["rc"] == "3") echo " (Three)"; if ($_GET["rc"] == "4") echo " (Four)"; if ($_GET["rc"] == "5") echo " (Five)"; } function reviewnj ( ) { echo " The Nutty Jester: ", $_GET [ "nj" ]; if ($_GET["nj"] == "0") echo " (Zero) "; if ($_GET["nj"] == "1") echo " (One)"; if ($_GET["nj"] == "2") echo " (Two)"; if ($_GET["nj"] == "3") echo " (Three)"; if ($_GET["nj"] == "4") echo " (Four)"; if ($_GET["nj"] == "5") echo " (Five)"; } function reviewpkc ( ) { echo " Pumpkin Carriage: ", $_GET [ "pkc" ]; if ($_GET["pkc"] == "0") echo " (Zero) "; if ($_GET["pkc"] == "1") echo " (One)"; if ($_GET["pkc"] == "2") echo " (Two)"; if ($_GET["pkc"] == "3") echo " (Three)"; if ($_GET["pkc"] == "4") echo " (Four)"; if ($_GET["pkc"] == "5") echo " (Five)"; } function reviewpd ( ) { echo " Princess Diaries: ", $_GET [ "pd" ]; if ($_GET["pd"] == "0") echo " (Zero) "; if ($_GET["pd"] == "1") echo " (One)"; if ($_GET["pd"] == "2") echo " (Two)"; if ($_GET["pd"] == "3") echo " (Three)"; if ($_GET["pd"] == "4") echo " (Four)"; if ($_GET["pd"] == "5") echo " (Five)"; } function reviewtp ( ) { echo " Tropical Princess: ", $_GET [ "tp" ]; if ($_GET["tp"] == "0") echo " (Zero) "; if ($_GET["tp"] == "1") echo " (One)"; if ($_GET["tp"] == "2") echo " (Two)"; if ($_GET["tp"] == "3") echo " (Three)"; if ($_GET["tp"] == "4") echo " (Four)"; if ($_GET["tp"] == "5") echo " (Five)"; } function reviewcp ( ) { echo " Career Princess: ", $_GET [ "cp" ]; if ($_GET["cp"] == "0") echo " (Zero) "; if ($_GET["cp"] == "1") echo " (One)"; if ($_GET["cp"] == "2") echo " (Two)"; if ($_GET["cp"] == "3") echo " (Three)"; if ($_GET["cp"] == "4") echo " (Four)"; if ($_GET["cp"] == "5") echo " (Five)"; } reviewpp ( ); reviewsp ( ); reviewpc ( ); reviewrc( ); reviewnj ( ); reviewpkc ( ); reviewpd ( ); reviewtp ( ); reviewcp ( ); ?>
  14. So I have a project due tomorrow, and for some reason, I can't get it to work. The html portion works, so I'll just paste it below as reference. Unfortunately, the php part is not working. When I run it, it does not render properly. Also, if I were to create a field where someone can input their email address, and they should receive an email confirmation, how would I go about doing so? I previously had code that would do that, unfortunately, it didn't work, so I deleted that. Php is the last one. Thanks in advance for any help! here's the html page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title> Princess Cupcakes </title> </head> <body> <link rel="stylesheet" href="phpcssstyle.css" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <h1>Princess Cupcakes<h1 /> <hr> <hr /> <h2>Warming hearts one cupcake at a time.</h2> <br> <h3>All cupcakes are $2.50 each unless otherwise noted. Please allow at least 20 minutes between order and pickup time.</h3> <br /> <hr> <hr /> <ul><b> <li>Pink Princess: Strawberry cupcake with a strawberry whipped cream frosting <li> Swan Princess: Vanilla cupcake with lemon buttercream frosting <li>Prince Charming: Chocolate cupcake with a raspberry buttercream frosting <li>Royal Crown: Red velvet cupcake with cheesecake frosting <li>The Nutty Jester: Nutella filled cupcake, with a nutella buttercream frosting <li>Pumpkin Carriage: Pumpkin cupcake with a pumpkin whipped cream frosting <li>Princess Diaries: Blueberry cupcake with blueberry whipped cream frosting <li>Tropical Princess: Mango and banana cupcake with a strawberry whipped cream frosting <li>Career Princess: Vanilla cake with dark chocolate buttercream frosting </b> <br> <br> <br /> <h3>Order your cupcakes here. For quantities over 5 per type of cupcake, please call us: <form action="ReviewOrder.php" method="get"> <p><b>Pink Princess</b></p> <p><input type="radio" name="pp" value="0" />Zero<br /> <input type="radio" name="pp" value="1" />One<br /> <input type="radio" name="pp" value="2" />Two <br /> <input type="radio" name="pp" value="3" />Three<br /> <input type="radio" name="pp" value="4" />Four<br /> <input type="radio" name="pp" value="5" />Five</p> <br> <p><b>Swan Princess</b></p> <p><input type="radio" name="sp" value="0" />Zero<br /> <input type="radio" name="sp" value="1" />One<br /> <input type="radio" name="sp" value="2" />Two<br /> <input type="radio" name="sp" value="3" />Three<br /> <input type="radio" name="sp" value="4" />Four<br /> <input type="radio" name="sp" value="5" />Five</p> <br> <p><b>Prince Charming</b></p> <p><input type="radio" name="pc" value="0" />Zero<br /> <input type="radio" name="pc" value="1" />One<br /> <input type="radio" name="pc" value="2" />Two<br /> <input type="radio" name="pc" value="3" />Three<br /> <input type="radio" name="pc" value="4" />Four<br /> <input type="radio" name="pc" value="5" />Five</p> <br> <p><b>Royal Crown</b></p> <p><input type="radio" name="rc" value="0" />Zero<br /> <input type="radio" name="rc" value="1" />One<br /> <input type="radio" name="rc" value="2" />Two<br /> <input type="radio" name="rc" value="3" />Three<br /> <input type="radio" name="rc" value="4" />Four<br /> <input type="radio" name="rc" value="5" />Five</p> <br> <p><b>The Nutty Jester</b></p> <p><input type="radio" name="nj" value="0" />Zero<br /> <input type="radio" name="nj" value="1" />One<br /> <input type="radio" name="nj" value="2" />Two<br /> <input type="radio" name="nj" value="3" />Three<br /> <input type="radio" name="nj" value="4" />Four<br /> <input type="radio" name="nj" value="5" />Five</p> <br> <p><b>Pumpkin Carriage</b></p> <p><input type="radio" name="pkc" value="0" />Zero<br /> <input type="radio" name="pkc" value="1" />One<br /> <input type="radio" name="pkc" value="2" />Two<br /> <input type="radio" name="pkc" value="3" />Three<br /> <input type="radio" name="pkc" value="4" />Four<br /> <input type="radio" name="pkc" value="5" />Five</p> <br> <p><b>Princess Diaries</b></p> <p><input type="radio" name="pd" value="0" />Zero<br /> <input type="radio" name="pd" value="1" />One<br /> <input type="radio" name="pd" value="2" />Two<br /> <input type="radio" name="pd" value="3" />Three<br /> <input type="radio" name="pd" value="4" />Four<br /> <input type="radio" name="pd" value="5" />Five</p> <br> <p><b>Tropical Princess</b></p> <p><input type="radio" name="tp" value="0" />Zero<br /> <input type="radio" name="tp" value="1" />One<br /> <input type="radio" name="tp" value="2" />Two<br /> <input type="radio" name="tp" value="3" />Three<br /> <input type="radio" name="tp" value="4" />Four<br /> <input type="radio" name="tp" value="5" />Five</p> <br> <p><b>Career Princess</b></p> <p><input type="radio" name="cp" value="0" />Zero<br /> <input type="radio" name="cp" value="1" />One<br /> <input type="radio" name="cp" value="2" />Two<br /> <input type="radio" name="cp" value="3" />Three<br /> <input type="radio" name="cp" value="4" />Four<br /> <input type="radio" name="cp" value="5" />Five</p> <br> <br> <p><input type="submit" value="OK" /></p> </form> <body /> <html /> here's the css: body { color: white; background: pink; margin-bottom: 6ex; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } h1 { color: #039; background: pink; margin-bottom: 2ex; } h2, h3, h4, h5, h6 { color: #039; } table { margin-right: auto; margin-bottom: 2ex; } thead td, th { color: black; background: #cccccc; font-size: smaller; font-weight: bold; text-align: center; padding: 0.5em 1ex; border: 1pt solid gray; } tbody td, td { color: black; background: #eeeeee; font-size: small; padding: 0.5em 1ex; border: 1pt solid gray; } pre { color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } and here's what's been giving me trouble...the php portion of it: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Review Order</title> </head> <body> <link rel="stylesheet" href="phpcssstyle.css" type="text/css" /> <h1>Review Order</h1> <?php function reviewpp ( ) { echo "<p>Pink Princess: ", $_GET [ "pp" ]; if ($_GET["pp"] == "0") echo " (Zero)</p>"; if ($_GET["pp"] == "1") echo " (One)</p>"; if ($_GET["pp"] == "2") echo " (Two)</p>"; if ($_GET["pp"] == "3") echo " (Three)</p>"; if ($_GET["pp"] == "4") echo " (Four)</p>"; if ($_GET["pp"] == "5") echo " (Five)</p>"; } function reviewsp ( ) { echo "<p>Swan Princess: ", $_GET [ "sp" ]; if ($_GET["sp"] == "0") echo " (Zero)</p>"; if ($_GET["sp"] == "1") echo " (One)</p>"; if ($_GET["sp"] == "2") echo " (Two)</p>"; if ($_GET["sp"] == "3") echo " (Three)</p>"; if ($_GET["sp"] == "4") echo " (Four)</p>"; if ($_GET["sp"] == "5") echo " (Five)</p>"; } function reviewpc ( ) { echo "<p>Prince Charming: ", $_GET [ "pc" ]; if ($_GET["pc"] == "0") echo " (Zero)</p>"; if ($_GET["pc"] == "1") echo " (One)</p>"; if ($_GET["pc"] == "2") echo " (Two)</p>"; if ($_GET["pc"] == "3") echo " (Three)</p>"; if ($_GET["pc"] == "4") echo " (Four)</p>"; if ($_GET["pc"] == "5") echo " (Five)</p>"; } function reviewrc ( ) { echo "<p>Royal Crown: ", $_GET [ "rc" ]; if ($_GET["rc"] == "0") echo " (Zero)</p>"; if ($_GET["rc"] == "1") echo " (One)</p>"; if ($_GET["rc"] == "2") echo " (Two)</p>"; if ($_GET["rc"] == "3") echo " (Three)</p>"; if ($_GET["rc"] == "4") echo " (Four)</p>"; if ($_GET["rc"] == "5") echo " (Five)</p>"; } function reviewnj ( ) { echo "<p>The Nutty Jester: ", $_GET [ "nj" ]; if ($_GET["nj"] == "0") echo " (Zero)</p>"; if ($_GET["nj"] == "1") echo " (One)</p>"; if ($_GET["nj"] == "2") echo " (Two)</p>"; if ($_GET["nj"] == "3") echo " (Three)</p>"; if ($_GET["nj"] == "4") echo " (Four)</p>"; if ($_GET["nj"] == "5") echo " (Five)</p>"; } function reviewpkc ( ) { echo "<p>Pumpkin Carriage: ", $_GET [ "pkc" ]; if ($_GET["pkc"] == "0") echo " (Zero)</p>"; if ($_GET["pkc"] == "1") echo " (One)</p>"; if ($_GET["pkc"] == "2") echo " (Two)</p>"; if ($_GET["pkc"] == "3") echo " (Three)</p>"; if ($_GET["pkc"] == "4") echo " (Four)</p>"; if ($_GET["pkc"] == "5") echo " (Five)</p>"; } function reviewpd ( ) { echo "<p>Princess Diaries: ", $_GET [ "pd" ]; if ($_GET["pd"] == "0") echo " (Zero)</p>"; if ($_GET["pd"] == "1") echo " (One)</p>"; if ($_GET["pd"] == "2") echo " (Two)</p>"; if ($_GET["pd"] == "3") echo " (Three)</p>"; if ($_GET["pd"] == "4") echo " (Four)</p>"; if ($_GET["pd"] == "5") echo " (Five)</p>"; } function reviewtp ( ) { echo "<p>Tropical Princess: ", $_GET [ "tp" ]; if ($_GET["tp"] == "0") echo " (Zero)</p>"; if ($_GET["tp"] == "1") echo " (One)</p>"; if ($_GET["tp"] == "2") echo " (Two)</p>"; if ($_GET["tp"] == "3") echo " (Three)</p>"; if ($_GET["tp"] == "4") echo " (Four)</p>"; if ($_GET["tp"] == "5") echo " (Five)</p>"; } function reviewcp ( ) { echo "<p>Career Princess: ", $_GET [ "cp" ]; if ($_GET["cp"] == "0") echo " (Zero)</p>"; if ($_GET["cp"] == "1") echo " (One)</p>"; if ($_GET["cp"] == "2") echo " (Two)</p>"; if ($_GET["cp"] == "3") echo " (Three)</p>"; if ($_GET["cp"] == "4") echo " (Four)</p>"; if ($_GET["cp"] == "5") echo " (Five)</p>"; } reviewpp ( ); reviewsp ( ); reviewpc ( ); reviewrc( ); reviewnj ( ); reviewpkc ( ); reviewpd ( ); reviewtp ( ); reviewcp ( ); ?> </body> </html>
  15. I'm using xampp already. Here is the error I received: Parse error: syntax error, unexpected T_ECHO in /Applications/xampp/xamppfiles/htdocs/xampp/classfolder/ch6/SaveInvoice.php on line 37
×
×
  • 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.