What do we need to run the poll?
- a mySQL database
- an Apache Web Server with PHP
Installation instructions can be found at www.webmonkey.com.
Ok, now we will create the necessary tables.Please note that the field names are written in bosnian language and changing the field names to something else would confuse PHP. So, type the following SQL into your shell prompt (or use phpMyAdmin):
create table anketa_pit( poll_id int not null auto_increment, pitanje text, primary key(poll_id) ); create table anketa_odg( poll_id int not null references anketa_pit, odg_id int not null auto_increment, odgovor text, hits int, primary key(odg_id) );
As you can see, only 2 tables are nedded. So, were finished with the database, lets move on to other tasks.
|» Level Advanced|
Rating: 6.75 Votes: 84
|Mirza Hatipovic is freelance developer based in Bosnia and Hercegovina. He uses Flash MX, PHP, XML amd Coldfusion to create dynamic web content.|
|Download the files used in this tutorial.|
|Download (5 kb)|
|More help? Search our boards for quick answers!|