Presentation is loading. Please wait.

Presentation is loading. Please wait.

Polling System Part 1 Creating PHP & MySQL Files CIS 254.

Similar presentations


Presentation on theme: "Polling System Part 1 Creating PHP & MySQL Files CIS 254."— Presentation transcript:

1 Polling System Part 1 Creating PHP & MySQL Files CIS 254

2 Polling System Create Database Upload Table information through PHP Creating Require() Files Add Polls Load Poll Data Vote For –Setting Cookies

3 Create Database Using Telnet and MySQL Admin –Create DB INTpoll –Set Permissions GRANT for DB and TABLE

4 Upload Table information through PHP In A PHP File, –Create connection to database –Create table in mysql_query statement –Insert tQable data in mysql_query statement –One statement per INSERT statement –Use echo mysql_error for troubleshooting

5 Creating Require() Files Allow you to insert information from a outside file into a current file. –Useful for headers, footers and commonly required variables. Create Connect.php Use REQUIRE() for connection variables Commonly called includes

6 Add Polls File used to input poll questions into system Poll questions come from database See file addpolls.php

7 Load Poll Data Loads Questions into Flash according to selection. –See loadpolldata.php

8 Vote For Check for previous votes –Using a cookie Update record with votes Send poll data back to flash –See votefor.php

9 Setting Cookies Cookies allow tracking of previous votes


Download ppt "Polling System Part 1 Creating PHP & MySQL Files CIS 254."

Similar presentations


Ads by Google