Loading ...
Sorry, an error occurred while loading the content.

Re: capturing form data

Expand Messages
  • ymnoor21
    Hello Bryan, First of all, you may want to post your problems in facebook version of the phpexpert group as the other one is much more active. Next, lets come
    Message 1 of 2 , May 9, 2012
    • 0 Attachment
      Hello Bryan,
      First of all, you may want to post your problems in facebook version of the phpexpert group as the other one is much more active. Next, lets come to your problem domain. You can do following:

      1. Create a lookup mySQL table consisting all teams (team-a, team-b etc)

      2. Populate their names in the drop down list / selectbox from the lookup mySQL table.

      3. So when you select a winner, you have the code to send to mysql (as of your description). Instead of storing this into a mysql table directly, just cross match with lookup table first. Whichever matches become the winner, and the other one a loser. So now you have both, you can now insert it into your table.

      Keep it in mind that you need to find a common id for selecting two teams. Such as Game ID probably. A game ID reference will give you the ability to select only two teams competing against each other instead of pulling out hundreds of teams while displaying them into the selectbox / drop down list (winner-loser) of yours.

      FB phpExpert Link:
      https://www.facebook.com/groups/pxperts/

      Thanks
      Yamin

      --- In phpexperts@yahoogroups.com, "Bryan Schulz" <b.schulz@...> wrote:
      >
      > hi,
      >
      > i'm kind of a new php coder.
      > i am experimenting with select lists in a html form.
      > i can send the chosen value to a mysql database but not the unselected value.
      >
      > if i have two teams in a select list, is there any way to send both team-a and team-b as winner and loser to fields in the mysql table?
      >
      > Bryan Schulz
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.