PDA

View Full Version : Creating a survey and displaying results on a webpage


fopa
05-21-2009, 09:42 AM
Hi All,

First post! :lol:

I need to create a single question survey and then display the results on a webpage under the question once they have submitted there answer. I am quite savvy with web forms, but unsure on how to display the result as opposed to sending the from data via mail.

Would anybody know if this is possible?

TIA

edbr
05-21-2009, 09:44 AM
a database to collect the submissions from the form

fopa
05-21-2009, 09:45 AM
Thanks for the quick reply, i shall go research your suggestion.

Corrosive
05-21-2009, 09:56 AM
Thanks for the quick reply, i shall go research your suggestion.

If you are comfortable with web forms and sending the results in an e-mail. You probably use PHP already. Combine this with a MySQL database to collect the answers and then run a query on the database to display the answers/score.

fopa
05-21-2009, 10:27 AM
Thanks for the reply.

I have been using PHP for mail functions, but also just use the mailto: option for the form at times when applicable.

I wont be able to use PHP for this particular survey, due to it being on an intranet and it needs to link into a bog standard html page, again i was considering using an i frame which links into an existing CMS that i have, as there are plenty of survey components for it.

MySQL is more than likely the db I will go for.

edbr
05-21-2009, 10:36 AM
you could use a local server on your intranet

fopa
05-21-2009, 10:40 AM
you could use a local server on your intranet

Thats my intention, thanks for the suggestion.

edbr
05-22-2009, 02:20 AM
check out apache 2triad,wamp, xxamp or easyphp all self installing apache servers with php and mysql

fopa
05-27-2009, 09:41 AM
Right i managed to make a survey with php and a flat file for data, problem i have now is i need to get a single question survery onto an old HTML page with tables holding the content, im unable to use PHP as the server is near full.

Im thinking along the lines of javascript, i also considered an I-frame but it keeps knocking the tables out.

edbr
05-27-2009, 10:20 AM
you can put an iframe into a div and use scroll bars for any overflow,

fopa
05-27-2009, 10:23 AM
I shall try the div suggestion, thanks!

fopa
05-27-2009, 01:51 PM
I have tried the DIV, maybe im missing something somewhere as it is still knocking the tables out. I can as a last resort just palce it along the bottom, but i know they prefer the location as per the pictures.

http://f.imagehost.org/t/0405/problem.jpg (http://f.imagehost.org/view/0405/problem)

http://f.imagehost.org/t/0064/current.jpg (http://f.imagehost.org/view/0064/current)


<div align="left" style="margin: 0; padding: 0;" <iframe src="http://web-dev012/HRMAIN.php" frameborder="0" width="700" height="300" scrolling="auto">


Any ideas?

domedia
05-27-2009, 04:00 PM
<div align="left" style="margin: 0; padding: 0;" <iframe src="http://web-dev012/HRMAIN.php" frameborder="0" width="700" height="300" scrolling="auto">
That is not HTML, you cannot put a tag inside the starting code of another tag. Only attributes are allowed. If you validate your page, it will tell you.

fopa
05-27-2009, 04:25 PM
Thanks for the reply, if you mean W3C validation etc, i am unable to do that as the page is hosted on an intranet. So if i still add the div and drop the i-frame below that will resolve the situation?

domedia
05-27-2009, 05:26 PM
Yes, just make sure you don't mix tags inside the code of other tags.