Forums
This topic is locked
Creating survey with Dreamweaver MX
Posted 14 Aug 2002 14:53:44
1
has voted
14 Aug 2002 14:53:44 Johnny Lee posted:
Hi,I try to create surveys with Dreamweaver MX using PHP and MySQL. I want to have unlimited number of questions and answers. So I created two tables:
Question ( qID, qName)
Answers ( aID, qID, aName)
Now on the survey, if I do this:
{rsQuestion.aName}
and make it a repeat region, then it would display all the questions together.
I did this:
{rsQuestion.aName}
{rsAnswers.aName}
and try to make a repeat region of both, but it doesn't work. It only allows to specify one recordset in the repeat region.
I also try to create static html survey and specify a dynamic value to each radio button, but that doesn't work either. It doesn't allow me to specify the aID and the qID.
I am not sure if this is allowed, but my survey is at isopersonals.com/survey/love.php
Please help me.
Replies
Replied 16 Aug 2002 14:58:26
16 Aug 2002 14:58:26 Wil Dobson replied:
I just had a similar issue.
What you need can all be generated with your SQL statement.
You need to JOIN the two table by the common id (qID).
A tutorial on this:
www.w3schools.com/sql/sql_join.asp
basically, it creates a 'virtual' table with all the data in it. You just recordset this new result. I have tried it with dreamweaver... The resulting fields all show up in the side menu of fields. Just drag and drop from there.
What you need can all be generated with your SQL statement.
You need to JOIN the two table by the common id (qID).
A tutorial on this:
www.w3schools.com/sql/sql_join.asp
basically, it creates a 'virtual' table with all the data in it. You just recordset this new result. I have tried it with dreamweaver... The resulting fields all show up in the side menu of fields. Just drag and drop from there.
Replied 17 Aug 2002 08:38:36
17 Aug 2002 08:38:36 Mark Staben replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi,
I try to create surveys with Dreamweaver MX using PHP and MySQL. I want to have unlimited number of questions and answers. So I created two tables:
Question ( qID, qName)
Answers ( aID, qID, aName)
Now on the survey, if I do this:
{rsQuestion.aName}
and make it a repeat region, then it would display all the questions together.
I did this:
{rsQuestion.aName}
{rsAnswers.aName}
and try to make a repeat region of both, but it doesn't work. It only allows to specify one recordset in the repeat region.
I also try to create static html survey and specify a dynamic value to each radio button, but that doesn't work either. It doesn't allow me to specify the aID and the qID.
I am not sure if this is allowed, but my survey is at isopersonals.com/survey/love.php
Please help me.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Not to take anything away from 'rolling your own' but you may want to check out phpESP, an awesome survey application for php/mysql.
phpesp.sourceforge.net/
Hi,
I try to create surveys with Dreamweaver MX using PHP and MySQL. I want to have unlimited number of questions and answers. So I created two tables:
Question ( qID, qName)
Answers ( aID, qID, aName)
Now on the survey, if I do this:
{rsQuestion.aName}
and make it a repeat region, then it would display all the questions together.
I did this:
{rsQuestion.aName}
{rsAnswers.aName}
and try to make a repeat region of both, but it doesn't work. It only allows to specify one recordset in the repeat region.
I also try to create static html survey and specify a dynamic value to each radio button, but that doesn't work either. It doesn't allow me to specify the aID and the qID.
I am not sure if this is allowed, but my survey is at isopersonals.com/survey/love.php
Please help me.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Not to take anything away from 'rolling your own' but you may want to check out phpESP, an awesome survey application for php/mysql.
phpesp.sourceforge.net/