将单选按钮值存储在数据库中 [英] store radio button value in database

查看:109
本文介绍了将单选按钮值存储在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在数据库中保存一个检查单选按钮的值.
这是我的html代码

i want to save a check radio button value in data base.
this is my html code

<input type="radio" name="r1" value="steps">Steps
<input type="radio" name="r1" value="minuts"> Minuts



从评论复制

我正在使用sql table字段,但选项(步骤或细节)存储在我尝试过的数据库中,但未存储值

针对用户,只有一个值被存储(步或分钟)并在保存信息后检索



Copied from Comment

i am working on my sql table field is option (steps or minuts)are stored in data base i have tried but not store the value

against the user only one value is store (steps or minuts) and retrive after saving the information

推荐答案

告诉我们更多事情:

1.您正在使用哪个数据库.
2.您是否有一个表和一个适当的字段来存储值?
3.您到目前为止尝试了什么?
4.您发现了哪些问题?
...

互联网上有大量关于如何使用php使用数据库的教程.

当您谈到单选按钮时,我将使用任何类型的数字变量将其值存储在那里...

请给我们提供更多详细信息,我们将尽力为您提供帮助.

PS:您应该使用sql查询来存储值...您可以向我们展示完整的代码吗?

PS2:在此处查看: http://www.php.net/manual/zh/ref.mysql .php ...应该有帮助...
Tell us more things:

1. which database is the one you are working with.
2. do you have a table and an apropiate field to store the value?
3. what have you tried so far?
4. which are the problems you''ve found?
...

There are tons of tutorials on how to work with databases using php in the internet...

As you are speaking of a radiobutton, I would use any kind of numeric variable to store its value there...

Please, give us more details and we will try to help you.

PS: You should use a sql query to store the value... could you show us the complete code?

PS2: Take a look here: http://www.php.net/manual/en/ref.mysql.php... it should help...


这篇关于将单选按钮值存储在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆