使用mysql数据填充html表单。 [英] Populating an html form with mysql data.

查看:59
本文介绍了使用mysql数据填充html表单。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,感谢您的帮助。我很确定我想要做的是基本的PHP。我知道我需要,但我真的不知道从哪里开始。


我所拥有的是一个基本的html表单,包括头字段和文件,将填充自一个mysql数据库。这是表单的一个小例子。

Hi all, thanks for helping. I''m sure what I want to do is amongst the basic in php. I know ehat I need but I really don''t where to begin.

What I have is a basic html form I have made consisting of header fields and fileds that will be populated from a mysql database. here is a small example of the form.

展开 | 选择 | Wrap | 行号

推荐答案

什么是你的MySQL表结构如何?标题是如何存储的?如何存储字段值?

我最初的反应是设置模板,但这可能很棘手,具体取决于您如何设置数据库。
What''s your MySQL table structure like? How are the headers stored? How are the field values stored?

My initial reaction would be to set up a template, but this might be tricky depending on how you have your database set up.



我已经完成了html表单,标题完好无损但如果没有特定标题的字段值,我不知道如何省略它们。
I have the html form already complete with the headers intact but I don''t know how to omit them if there are no field values for that particular header.



请发布您的表格,然后我们就可以找到您要找的内容。

Please post this form that you made, then we can find out what you are looking for.



你的MySQL表结构是什么样的?标题是如何存储的?如何存储字段值?
What''s your MySQL table structure like? How are the headers stored? How are the field values stored?



您好pbmods,感谢您的回复。


我的表格结构细分为最低3nf,有些表格已经淘汰到4nf。总共大约有45个表,但我只使用了我创建的这个模板的某些字段。


标题不存储在数据库中,它们只是html中的标题打破了数据分类。例如,人是指人。标题将具有高度,重量,眼睛颜色等。这些属性可以在数据库中的不同表上分解。以下是我的模板中的一些示例html,我将在负责任的人的标题下使用。同样,该标题不存储在数据库中,但仅用于使html模板对最终用户更具可读性。


括号表示我希望字段从中绘制的位置db。

Hi pbmods, thanks for the response.

My table structure is broken down to minimally 3nf and some tables are out to 4nf. There are about 45 tables in total but I am only using certain fields for this template I have created.

The headers are not stored in the database, they are just headers in the html that breaks up the classification of data. For example, the "HUMAN" heading would have height, weight, eye color, etc. Those attributes may be broken out over different tables in the database. Following is some sample html from my template that I would use under a heading of "RESPONSIBLE PERSON". Again, that heading is not stored in the db but is only there to make the html template more readable to the end user.

The brackets denote where I want the fields to draw from the the db.

展开 | 选择 | Wrap | 行号


这篇关于使用mysql数据填充html表单。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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