Jump to content

mc

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Woohoo! :D Thanks a million dptr1988, that did it. Also thanks to lead2gold for taking your time.
  2. I get this error: Parse error: parse error, unexpected T_STRING in /home/www/anihhh/admin.php on line 87 Here are the lines added: [code] 84: switch ($_POST['venue']) 85: { 86:     case "chicago": 87:     $insertDb = "INSERT INTO events (venue) VALUES ("<a href='www.chicago.com'>Chicago, IL</a>") 88:     break; 89:     case "newyork": etc... [/code]
  3. Thanks for the quick reply! I have the connection happening at the very end, are you saying I should have that after each case?
  4. Hi all, I'm having trouble trying to get a page where the user can select an option from a dropdown, then when submitted it sends an html link to the database. This is the code I was trying to make work, with no success: [code]switch ($_POST['venue']) { case "chicago": $insertDb = "INSERT INTO events (venue) VALUES ("<a href='chicago.html'>Chicago, IL</a>")} break; case "newyork": $insertDb = "INSERT INTO events (venue) VALUE ("<a href='newyork.html'>New York, NY</a>") break; case "sanjose": $insertDb = "INSERT INTO events (venue) VALUE ("<a href='sanjose.html'>San Jose, CA</a>") break; default: $insertDb = "INSERT INTO events (venue) VALUE ("<a href='default.html'>Default</a>") break; } [/code] And this is in the form: [code] <select name="venue" id="venue"> <option value="chicago">Chicago, IL</option> <option value="newyork">New York, NY</option> <option value="sanjose">San Jose, CA</option> </select> [/code] Any help is greatly appreciated!
×
×
  • 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.