SQL, PHP and Form submission question re: tutorials

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I've been searching for some good tutorials on how to use "UPDATE" in PHP. I've found some fairly decent tutes about PHP in general, but I'm having difficulty locating one that gives a good explanation about updating database tables from the results of the form submission.

Here is one example of one form I am creating. The form is for my pool players to submit their weekly picks. The form is created. I just have no idea how to get the submitted data into the appropriate table and under the current user's column. In addition, as a hidden input I will have a "user_name" value which is the phpBB variable for the logged-in member's user_name. I know I'll need this to know which column to update.

I'm beginning to understand enough to know that if I can find a worthwhile tutorial that gives good details on how to update a table, I can write the script and make some good headway in finishing my project as this is specifically what is stalling it.

If anyone can recommend some good tutes on this, I'd appreciate it.

If it helps here is an example of the form I'll be using. I know that looks a little long, but the code I wrote is from an SQL query and is generated from a shedule database table I already have set up. So I actually only have to type a few lines of code and the table is automatically generated to look like below. (I haven't included the hidden input for the user_name yet):

Code: [ Select ]
<form method="POST" action="pick_pre_week2.php">

    <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
    <tr>
     <th height="25" class="thCornerL" nowrap="nowrap">Preseason<br> Week 2</th>

     <th class="thTop" nowrap="nowrap">Visiting Team</th>
        <th class="thTop" nowrap="nowrap">Pick</th>
     <th class="thTop" nowrap="nowrap">Home Team</th>
        <th class="thTop" nowrap="nowrap">Pick</th>
        <th class="thTop" nowrap="nowrap">Day</th>
     <th class="thTop" nowrap="nowrap">Date</th>
        <th class="thTop" nowrap="nowrap">Game Time</th>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&1&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Oakland</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="1" value="Oakland" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">San Francisco</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="1" value="San Fancisco" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">THU</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-14</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&2&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Miami</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="2" value="Miami" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Jacksonville</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="2" value="Jacksonville" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&3&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Carolina</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="3" value="Carolina" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">N.Y. Giants</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="3" value="N.Y. Giants" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">FRI</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&4&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Green Bay</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="4" value="Green Bay" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Cleveland</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="4" value="Cleveland" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&5&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Houston</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="5" value="Houston" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">Dallas</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="5" value="Dallas" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">FRI</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&6&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Seattle</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="6" value="Seattle" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Indianapolis</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="6" value="Indianapolis" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&7&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Detroit</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="7" value="Detroit" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">Cincinnati</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="7" value="Cincinnati" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&8&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Philadelphia</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="8" value="Philadelphia" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Pittsburgh</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="8" value="Pittsburgh" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&9&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Baltimore</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="9" value="Baltimore" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">Atlanta</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="9" value="Atlanta" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&10&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Buffalo</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="10" value="Buffalo" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Tennessee</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="10" value="Tennessee" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&11&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">New England</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="11" value="New England" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">Washington</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="11" value="Washington" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&12&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">New Orleans</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="12" value="New Orleans" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">N.Y. Jets</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="12" value="N.Y. Jets" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&13&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Denver</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="13" value="Denver" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">Chicago</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="13" value="Chicago" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">8:05 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&14&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Minnesota</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="14" value="Minnesota" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">Kansas City</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="14" value="Kansas City" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:30 PM</span></td>


    </tr>
    <tr>
     <td class="row1" align="center"><span class="gensmall">&15&</span></td>

     <td class="row1" align="center" valign="middle"><span class="gensmall">Arizona</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="15" value="Arizona" /></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">San Diego</span></td>
        <td class="row1" align="center" valign="middle"><input type="radio" name="15" value="San Diego" /></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
     <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
        <td class="row1" align="center" valign="middle"><span class="gensmall">10:00 PM</span></td>


    </tr>
    <tr>
     <td class="row2" align="center"><span class="gensmall">&16&</span></td>

     <td class="row2" align="center" valign="middle"><span class="gensmall">Tampa Bay</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="16" value="Tampa Bay" /></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">St. Louis</span></td>
        <td class="row2" align="center" valign="middle"><input type="radio" name="16" value="St. Louis" /></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">MON</span></td>
     <td class="row2" align="center" valign="middle"><span class="gensmall">8-18</span></td>
        <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>


    </tr>
    <tr>
     <td class="catbottom" colspan="2" height="28"><span class="gensmall">* All Times are Eastern</span></td>
        <td class="catbottom" colspan="6" height="28"><span class="gensmall">Enter the total Monday Night Game points for the tiebreaker. &<input type="text" name="tiebreaker" value="" size="4" class="liteoption" /></span></td>
    </tr>
 </table>
    <input type="submit" name="submit" value="Submit Your Picks" class="liteoption" />&<input type="reset" name="reset" value="Clear Your Picks" class="liteoption" />
  1. <form method="POST" action="pick_pre_week2.php">
  2.     <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  3.     <tr>
  4.      <th height="25" class="thCornerL" nowrap="nowrap">Preseason<br> Week 2</th>
  5.      <th class="thTop" nowrap="nowrap">Visiting Team</th>
  6.         <th class="thTop" nowrap="nowrap">Pick</th>
  7.      <th class="thTop" nowrap="nowrap">Home Team</th>
  8.         <th class="thTop" nowrap="nowrap">Pick</th>
  9.         <th class="thTop" nowrap="nowrap">Day</th>
  10.      <th class="thTop" nowrap="nowrap">Date</th>
  11.         <th class="thTop" nowrap="nowrap">Game Time</th>
  12.     </tr>
  13.     <tr>
  14.      <td class="row1" align="center"><span class="gensmall">&1&</span></td>
  15.      <td class="row1" align="center" valign="middle"><span class="gensmall">Oakland</span></td>
  16.         <td class="row1" align="center" valign="middle"><input type="radio" name="1" value="Oakland" /></td>
  17.      <td class="row1" align="center" valign="middle"><span class="gensmall">San Francisco</span></td>
  18.         <td class="row1" align="center" valign="middle"><input type="radio" name="1" value="San Fancisco" /></td>
  19.         <td class="row1" align="center" valign="middle"><span class="gensmall">THU</span></td>
  20.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-14</span></td>
  21.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  22.     </tr>
  23.     <tr>
  24.      <td class="row2" align="center"><span class="gensmall">&2&</span></td>
  25.      <td class="row2" align="center" valign="middle"><span class="gensmall">Miami</span></td>
  26.         <td class="row2" align="center" valign="middle"><input type="radio" name="2" value="Miami" /></td>
  27.      <td class="row2" align="center" valign="middle"><span class="gensmall">Jacksonville</span></td>
  28.         <td class="row2" align="center" valign="middle"><input type="radio" name="2" value="Jacksonville" /></td>
  29.         <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
  30.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  31.         <td class="row2" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>
  32.     </tr>
  33.     <tr>
  34.      <td class="row1" align="center"><span class="gensmall">&3&</span></td>
  35.      <td class="row1" align="center" valign="middle"><span class="gensmall">Carolina</span></td>
  36.         <td class="row1" align="center" valign="middle"><input type="radio" name="3" value="Carolina" /></td>
  37.      <td class="row1" align="center" valign="middle"><span class="gensmall">N.Y. Giants</span></td>
  38.         <td class="row1" align="center" valign="middle"><input type="radio" name="3" value="N.Y. Giants" /></td>
  39.         <td class="row1" align="center" valign="middle"><span class="gensmall">FRI</span></td>
  40.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  41.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  42.     </tr>
  43.     <tr>
  44.      <td class="row2" align="center"><span class="gensmall">&4&</span></td>
  45.      <td class="row2" align="center" valign="middle"><span class="gensmall">Green Bay</span></td>
  46.         <td class="row2" align="center" valign="middle"><input type="radio" name="4" value="Green Bay" /></td>
  47.      <td class="row2" align="center" valign="middle"><span class="gensmall">Cleveland</span></td>
  48.         <td class="row2" align="center" valign="middle"><input type="radio" name="4" value="Cleveland" /></td>
  49.         <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
  50.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  51.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  52.     </tr>
  53.     <tr>
  54.      <td class="row1" align="center"><span class="gensmall">&5&</span></td>
  55.      <td class="row1" align="center" valign="middle"><span class="gensmall">Houston</span></td>
  56.         <td class="row1" align="center" valign="middle"><input type="radio" name="5" value="Houston" /></td>
  57.      <td class="row1" align="center" valign="middle"><span class="gensmall">Dallas</span></td>
  58.         <td class="row1" align="center" valign="middle"><input type="radio" name="5" value="Dallas" /></td>
  59.         <td class="row1" align="center" valign="middle"><span class="gensmall">FRI</span></td>
  60.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  61.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  62.     </tr>
  63.     <tr>
  64.      <td class="row2" align="center"><span class="gensmall">&6&</span></td>
  65.      <td class="row2" align="center" valign="middle"><span class="gensmall">Seattle</span></td>
  66.         <td class="row2" align="center" valign="middle"><input type="radio" name="6" value="Seattle" /></td>
  67.      <td class="row2" align="center" valign="middle"><span class="gensmall">Indianapolis</span></td>
  68.         <td class="row2" align="center" valign="middle"><input type="radio" name="6" value="Indianapolis" /></td>
  69.         <td class="row2" align="center" valign="middle"><span class="gensmall">FRI</span></td>
  70.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  71.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  72.     </tr>
  73.     <tr>
  74.      <td class="row1" align="center"><span class="gensmall">&7&</span></td>
  75.      <td class="row1" align="center" valign="middle"><span class="gensmall">Detroit</span></td>
  76.         <td class="row1" align="center" valign="middle"><input type="radio" name="7" value="Detroit" /></td>
  77.      <td class="row1" align="center" valign="middle"><span class="gensmall">Cincinnati</span></td>
  78.         <td class="row1" align="center" valign="middle"><input type="radio" name="7" value="Cincinnati" /></td>
  79.         <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  80.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  81.         <td class="row1" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>
  82.     </tr>
  83.     <tr>
  84.      <td class="row2" align="center"><span class="gensmall">&8&</span></td>
  85.      <td class="row2" align="center" valign="middle"><span class="gensmall">Philadelphia</span></td>
  86.         <td class="row2" align="center" valign="middle"><input type="radio" name="8" value="Philadelphia" /></td>
  87.      <td class="row2" align="center" valign="middle"><span class="gensmall">Pittsburgh</span></td>
  88.         <td class="row2" align="center" valign="middle"><input type="radio" name="8" value="Pittsburgh" /></td>
  89.         <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  90.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  91.         <td class="row2" align="center" valign="middle"><span class="gensmall">7:30 PM</span></td>
  92.     </tr>
  93.     <tr>
  94.      <td class="row1" align="center"><span class="gensmall">&9&</span></td>
  95.      <td class="row1" align="center" valign="middle"><span class="gensmall">Baltimore</span></td>
  96.         <td class="row1" align="center" valign="middle"><input type="radio" name="9" value="Baltimore" /></td>
  97.      <td class="row1" align="center" valign="middle"><span class="gensmall">Atlanta</span></td>
  98.         <td class="row1" align="center" valign="middle"><input type="radio" name="9" value="Atlanta" /></td>
  99.         <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  100.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-15</span></td>
  101.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  102.     </tr>
  103.     <tr>
  104.      <td class="row2" align="center"><span class="gensmall">&10&</span></td>
  105.      <td class="row2" align="center" valign="middle"><span class="gensmall">Buffalo</span></td>
  106.         <td class="row2" align="center" valign="middle"><input type="radio" name="10" value="Buffalo" /></td>
  107.      <td class="row2" align="center" valign="middle"><span class="gensmall">Tennessee</span></td>
  108.         <td class="row2" align="center" valign="middle"><input type="radio" name="10" value="Tennessee" /></td>
  109.         <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  110.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  111.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  112.     </tr>
  113.     <tr>
  114.      <td class="row1" align="center"><span class="gensmall">&11&</span></td>
  115.      <td class="row1" align="center" valign="middle"><span class="gensmall">New England</span></td>
  116.         <td class="row1" align="center" valign="middle"><input type="radio" name="11" value="New England" /></td>
  117.      <td class="row1" align="center" valign="middle"><span class="gensmall">Washington</span></td>
  118.         <td class="row1" align="center" valign="middle"><input type="radio" name="11" value="Washington" /></td>
  119.         <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  120.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  121.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  122.     </tr>
  123.     <tr>
  124.      <td class="row2" align="center"><span class="gensmall">&12&</span></td>
  125.      <td class="row2" align="center" valign="middle"><span class="gensmall">New Orleans</span></td>
  126.         <td class="row2" align="center" valign="middle"><input type="radio" name="12" value="New Orleans" /></td>
  127.      <td class="row2" align="center" valign="middle"><span class="gensmall">N.Y. Jets</span></td>
  128.         <td class="row2" align="center" valign="middle"><input type="radio" name="12" value="N.Y. Jets" /></td>
  129.         <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  130.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  131.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  132.     </tr>
  133.     <tr>
  134.      <td class="row1" align="center"><span class="gensmall">&13&</span></td>
  135.      <td class="row1" align="center" valign="middle"><span class="gensmall">Denver</span></td>
  136.         <td class="row1" align="center" valign="middle"><input type="radio" name="13" value="Denver" /></td>
  137.      <td class="row1" align="center" valign="middle"><span class="gensmall">Chicago</span></td>
  138.         <td class="row1" align="center" valign="middle"><input type="radio" name="13" value="Chicago" /></td>
  139.         <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  140.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  141.         <td class="row1" align="center" valign="middle"><span class="gensmall">8:05 PM</span></td>
  142.     </tr>
  143.     <tr>
  144.      <td class="row2" align="center"><span class="gensmall">&14&</span></td>
  145.      <td class="row2" align="center" valign="middle"><span class="gensmall">Minnesota</span></td>
  146.         <td class="row2" align="center" valign="middle"><input type="radio" name="14" value="Minnesota" /></td>
  147.      <td class="row2" align="center" valign="middle"><span class="gensmall">Kansas City</span></td>
  148.         <td class="row2" align="center" valign="middle"><input type="radio" name="14" value="Kansas City" /></td>
  149.         <td class="row2" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  150.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  151.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:30 PM</span></td>
  152.     </tr>
  153.     <tr>
  154.      <td class="row1" align="center"><span class="gensmall">&15&</span></td>
  155.      <td class="row1" align="center" valign="middle"><span class="gensmall">Arizona</span></td>
  156.         <td class="row1" align="center" valign="middle"><input type="radio" name="15" value="Arizona" /></td>
  157.      <td class="row1" align="center" valign="middle"><span class="gensmall">San Diego</span></td>
  158.         <td class="row1" align="center" valign="middle"><input type="radio" name="15" value="San Diego" /></td>
  159.         <td class="row1" align="center" valign="middle"><span class="gensmall">SAT</span></td>
  160.      <td class="row1" align="center" valign="middle"><span class="gensmall">8-16</span></td>
  161.         <td class="row1" align="center" valign="middle"><span class="gensmall">10:00 PM</span></td>
  162.     </tr>
  163.     <tr>
  164.      <td class="row2" align="center"><span class="gensmall">&16&</span></td>
  165.      <td class="row2" align="center" valign="middle"><span class="gensmall">Tampa Bay</span></td>
  166.         <td class="row2" align="center" valign="middle"><input type="radio" name="16" value="Tampa Bay" /></td>
  167.      <td class="row2" align="center" valign="middle"><span class="gensmall">St. Louis</span></td>
  168.         <td class="row2" align="center" valign="middle"><input type="radio" name="16" value="St. Louis" /></td>
  169.         <td class="row2" align="center" valign="middle"><span class="gensmall">MON</span></td>
  170.      <td class="row2" align="center" valign="middle"><span class="gensmall">8-18</span></td>
  171.         <td class="row2" align="center" valign="middle"><span class="gensmall">8:00 PM</span></td>
  172.     </tr>
  173.     <tr>
  174.      <td class="catbottom" colspan="2" height="28"><span class="gensmall">* All Times are Eastern</span></td>
  175.         <td class="catbottom" colspan="6" height="28"><span class="gensmall">Enter the total Monday Night Game points for the tiebreaker. &<input type="text" name="tiebreaker" value="" size="4" class="liteoption" /></span></td>
  176.     </tr>
  177.  </table>
  178.     <input type="submit" name="submit" value="Submit Your Picks" class="liteoption" />&<input type="reset" name="reset" value="Clear Your Picks" class="liteoption" />



Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

As far as any good tutorials, I am not sure, I haven't looked yet.

I just wanted to mention that I believe the UPDATE command is a MySQL command that you can pass to MySQL through PHP (or any other language) when you want to change something in some kind of table in the MySQL database. It really isn't a PHP command or function. Just wanted to point that out in case you weren't sure. I am fairly confident in my answer. You might be better off looking up a MySQL tutorial. Of course the one you probably want is where they talk about using PHP and MySQL together. Anyway just thought I would mention that.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Actually, I am aware of that. In fact, I'm going through a couple ASP tutes I just found to see if they help. Thanks.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

A good find:
http://codewalkers.com/tutorials/12/1.html

This one is getting me started. Very clear and understandable. Still will take any suggestions anyone has to offer.
  • tierra
  • Student
  • Student
  • User avatar
  • Posts: 91

Post 3+ Months Ago

As noted, PHP has nothing to do with it... here's the actual MySQL specs (I ALWAYS use this online manual for reference): http://www.mysql.com/documentation/mysq ... tml#UPDATE
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Thanks Tierra....I have read that multiple times. Unfortunately, I haven't found much success from the MySQL and PHP manuals....

I'm having much better luck discovering what I may through various tutes I've found through searches. I understand what "UPDATE" does (more-or-less) and the syntax (more-or-less), But I learn better when I have good working examples.

This phpBB code has taught me much and I'm using what I decipher from it as a tutorial per se as well.

But I just haven't found very "clear" info on practical ways to do "update" ...I'm getting closer though....from the tute I posted above at least now I understand how $_Post works

My primary concern is that I don't want to overwrite data that is already entered into the table that I don't want to. In the above form example that's not an issue...but I am also creating an administrative area for updating weekly game scores and I want to be sure I don't overwrite any that already exist given the "admins" submission.

Your thought is well-taken though. That was the first place I looked.

Thanks
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Perhaps it might also be helpful to again mention that the primary reason I decided to write this proggy myself, is because I wanted it to be compatable with the phpBB members database tables. I wanted existing members to log in and play the pools. To date I haven't found anyone else out there who has done that...so, by default, I took it upon myself to learn how.

If I can get this done, it's my initial intent to set it up as an open source thing that can be added to any phpBB board. In the long run, I'd like to do it as a stand alone and sell it to those who want it.

Since I'm a total newbie at this (only been doing this code about a month)...I'm not sure how, when or where I'm going to do that...but I learn as I go.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 160 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.