Jump to content

OCHE1976

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by OCHE1976

  1. I have a members list in a database. I have some filling in information all the time about these members. I do not want him to have to enter the name all the time. I would like to give him a drop down menu with all the names. However, this member list changes all the time. If the name is not in the table, I will give him the ability to enter a new name into the database. That I know is easy. So, to the question: How would I create a drop down menu from a list within an SQL Database? Thanks, David
  2. Receiving the following error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Blind Draw, David Hascup, 1st, 12, 60)' at line 2 [code] <?php $event = "Ringside Blind Draw"; $date = $_POST['date']; $dbh=mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("username_rankings"); $player = $_POST['1sta']; $place = '1st'; $points = 5 * $_POST['entries']; $insert = "INSERT INTO `2006` (`date`, `event`, `player`, `place`, `entries`, `points`)     VALUES ($date, $event, $player, $place, $entries, $points)"; $results = mysql_query($insert) or die(mysql_error()); [/code]
  3. Not sure if I am doing this correcly, but the SQL database is NOT being loaded. For each person listed on the form, I need to create a seperate record with different information. You can view the form at: [a href=\"http://www.usadarts.com/adorep/lod.htm\" target=\"_blank\"]http://www.usadarts.com/adorep/lod.htm[/a] Form Code [code] <form action="post.php" method="POST">     <b><i>     <center>       Enter LOD Results     </center>     </i></b>     <table border="5" cellspacing="10" cellpadding="10" align="center">       <tr>         <td> <b>Date:</b> </td>         <td>           <select name="date">             <OPTION VALUE="">Select Date             <OPTION VALUE="20060304">March 4, 2006             <OPTION VALUE="20060311">March 11, 2006             <OPTION VALUE="20060318">March 18, 2006            </select>         </td>       </tr>       <tr>         <td valign="top"> <b>Number of Entries:</b> </td>         <td>           <input type="text" name="entries" size="3">         </td>       </tr>       <tr>         <td valign="top"> <b>1st Place:</b> </td>         <td> Player 1           <input type="text" name="1sta" size="30">           <br>           Player 2           <input type="text" name="1stb" size="30">         </td>       </tr>       <tr>         <td valign="top"> <b>2nd Place:</b> </td>         <td> Player 1           <input type="text" name="2nda" size="30">           <br>           Player 2           <input type="text" name="2ndb" size="30">         </td>       </tr>       <tr>         <td valign="top"> <b>3/4th Place:</b> </td>         <td> Player 1           <input type="text" name="3rda" size="30">           <br>           Player 2           <input type="text" name="3rdb" size="30">         </td>       </tr>       <tr>         <td valign="top"> <b>3/4th Place:</b> </td>         <td> Player 1           <input type="text" name="4tha" size="30">           <br>           Player 2           <input type="text" name="4thb" size="30">         </td>       </tr>       <tr>         <td>           <input type="reset" name="Submit" value="Clear Form">         </td>         <td>           <input type="submit" name="Submit" value="Submit Form">         </td>       </tr>     </table>   </form>[/code] and here is the PHP code: [code] <?php $event = 'Ringside Pub LOD' $date = $_POST['date']; $dbh=mysql_connect ("localhost", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("username_rankings"); $player = $_POST['1sta']; $place = '1st'; $points = 5 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['1stb']; $place = '1st'; $points = 5 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['2nda']; $place = '2nd'; $points = 3 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['2ndb']; $place = '2nd'; $points = 3 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['3rda']; $place = 'Top 4'; $points = 1 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['3rdb']; $place = 'Top 4'; $points = 1 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['4tha']; $place = 'Top 4'; $points = 1 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); $player = $_POST['4thb']; $place = 'Top 4'; $points = 1 * $_POST['entries']; $insert = "INSERT INTO 2006 (date, event, player, place, entries, points)     VALUES ('$date', '$event', '$player', '$place', '$entries', '$points')"; $results = mysql_query($insert); ?>[/code]
  4. I need to setup something to allow a user to upload pictures and add a caption to them as well. I would like to first show all the pictures in thumbnail and then give them the option to expand on a click. Is there code of software to purchase that can help me with this? If software is only way, I do not want the user to have to have the software. I would want them to upload via a webpage. Thanks David
×
×
  • 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.