我想知道是否有人可以帮我用我的php-mysql设计
我目前的应用程序(或多或少的调查应用程序),它可让用户存储有关在其他产品中定位特定功能的问题,这些产品也保存在数据库的其他表中!
例如,用户可以发布汽车:然后询问用户是否在车内安装了安全元件。
汽车分贝:身份证,品牌,安全
brand = Fast
saftety = ABS=ABS (Anti lock braking System),DriverAirBag=Air bags
问题db:ID,问题,答案,目标,类型
例如数据:
Question:safety options you like
Answer:ABS=ABS (Anti lock braking System),DriverAirBag=Air bags"
target:saftey
type=checkbox
问题是要显示存储的问题,我必须。
1) loop through all questions, echo Question and echo target in hidden input,
2) explode Answer field twice(1st w/ "," to get each answer and other with "=" to differ > between whats inside the database[0] and a user friendly text[1]
3) check type to chose display type (3 options checkbox,select,text)
4) set this display type of [0] and show [1] for user !!! (stupid i know:()
eg:
< checkbox
value=$expolde[0]>$explode[1]
所有这些步骤使得维护非常困难,不管什么意思都不能灵活地显示,因为显示器被嵌入代码:(,
有任何想法吗 :) ?