问题描述
嗨!我是PHP新手,但我在Perl / CGI /模板方面非常有经验。
当我们处理大量数据时,我在医疗信息学方面工作
收集表格。其中一些有超过1000个元素!表格不是由PHP输出的b $ b,它们是由护士使用各种视觉HTML设计的。
editors / drag& drop /。
好的,将所有字段提交到
MySQL服务器相对容易。但总是有可能出现数据输入错误或
表格必须是可打印的(因为它看起来在填写时,所有
视觉元素)。这意味着我们必须检索所有值并在屏幕上显示它们(准备好重新提交)。
所以我想知道经验丰富的PHP用户会做什么这里。是否有任何
特殊的类/模块可以获取html文件并将
值插入相应的< input>元素?或者什么可以使我的生活变得更轻松?
或者它是否真的是让它工作的唯一方法来放置1000<?php echo
" value = $ value" ?>插入我的HTML代码?
这是非常繁琐的工作!!!
谢谢,
卢克
解析INPUT标签,设置或替换它们的VALUE属性,然后
替换HTML中的标签。 Hololib中有一个HTML解析器:
-
Alan Little
Phorm PHP表格处理器
Hi! I am new to PHP but I am a very experienced in Perl/CGI/templates.
I work in medical informatics when we deal with very large data
collection forms. Some of them have over 1000 elements! Forms are not
outputted by PHP, they are designed by nurses using various visual HTML
editors /drag & drop/.
Ok, it is relatively easy to get all the fields submitted into the
MySQL server. But there is always a chance of a data entry error or a
form has to be printable (as it looks when being filled out, with all
visual elements). It means we have to retrieve all values and present
them on the screen (ready to be resubmitted).
So I wonder what would experienced PHP users do here. Are there any
special Classes/modules that would take an html file and insert the
values into corresponding <input> elements? Or anything what could make
my life easier?
Or is it really the only way to get it worked to place 1000 <?php echo
"value=$value" ?> inserts in my HTML code?
That''s a VERY TEDIOUS WORK!!!
Thanks,
Luke
Parse out the INPUT tags, set or replace their VALUE attributes, then
replace the tag in the HTML. There''s an HTML parser in Hololib:
ftp://ftp.holotech.net/hololib.zip
--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
这篇关于可编辑的表单,包含1000个元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!