Re: Re: radio form submission
| From: | Jim Giner | Date: | Fri, 24 Jun 2011 14:18:03 +0000 |
| Subject: | Re: Re: radio form submission | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47882@lists.php.net to get a copy of this message | ||
The error is pretty explicit - there is no field in your table called
'250kbps'. What you should have is a field (column) called "speed" for
example, with values from 1...5 or whatever. To the users they will only
deal with actual speed values on their screen if you use the speeds as the
value parms of your html. To you, the programmer, yes - you could use a
switch statement to convert the incoming radio button value to a 1 or 2 or
3, etc. and store that value to the "speed" column or not. I'm thinking
that you are trying to store each radio button to its own column in your
table which is not good, normalized structure.
"Chris Stinemetz" <chrisstinemetz@gmail.com> wrote in message
news:BANLkTi=jA+YeEGwCSvwBcjeb6WP1gG6M=g@mail.gmail.com...
> Thanks everyone.
>
> So I am trying to keep this simple and just assign the value with the
> radio button and then insert it into mysql database, but with the
> following code I am getting the mysql error: Unknown column '250kbps'
> in 'field list' when I choose the first radio button.