Would someone be nice to help me with this poll ? =)


Im developing a little POll for my site

Im done with the script that calculates and view the poll and the "vote" insert query and now im struggling with the NEW POLL query, how i insert a new poll in the database.

I have the poll in 3 tables

The questions itself are stored in a table called "poll_questions"

that contain

ID auto inchrement
writer_id
question

and another table for "possibilites"

ID
ID_question << this contains the id of the question
possibilites

And now im gonna see how one poll qould look like in this tables

The question is "Does this question mean im total idiot"?

and the possibilities are yes,no,youre ok..

The poll_question

ID [6]
writer_id [0585] << whatever!
question [Does this question mean im total idiot]

and the possibilites table would be

ID [798]
ID_question [6]
possibilite [yes]

ID [799]
ID_question [6]
possibilite [no]

ID [800]
ID_question [6]
possibilite [youre ok..]

I also have another table for answears but that is no need to show that..


And what query would i have to have to insert this new poll into this database?

In the form page would the input form that has the name "pollquiz" and the possibilities input boxes that are up to 5 has name name answear1,answear2,answear3,answear5


Could somone give me a taste of the code that would insert this new poll into this tables in database?

That would be greatly appreciate?