Webserver - PHP/MySQL Poll Online
Wednesday, April 18th, 2007An Opensource PHP/MySQL web-based poll has been brought online.
Poll Source: Advanced Poll v2.0.7 (PHP/MySQL)
Copyright (c) Chi Kien Uong
URL: http://www.proxy2.de
Installed to: SML Apache 2 webserver and MySQL Database Server.
Installation Steps.
- Script unzipped to s:apache2htdocssmlpoll
- Database PC: The database was created by means of a script - all scripts under c:mySQLscriptspoll on database PC - which
a) Created the database (CREATE DATABASE POLL;)
b) Granted remote admin-name access to this database to the webserver PC
(GRANT ALL TO [admin-name]@webserver)
The actual names used are in the MySQL script, not listed here for security. - Apache2 PC: htdocssmlpollincludeconfig.inc.php was edited to have
db: poll
host: 137.195.80.146
username: [admin-name]
password [same as MySQL root password] - With a web browser, the installation PHP script was then run: /sml/poll/install.php
The username and password - as above - were requested and the database configured automatically.
The above install.php script was then deleted.
Administration of the poll is via a web browser to /sml/poll/admin/ and requires the credentials above.
Using the Poll: EndNote or Reference Manager?
The first poll created was a choice between EndNote or Reference Manager:
http://www.sml.hw.ac.uk:8080/sml/poll/endnote/index.php
The header includes the text:
<?php
header("Cache-control: private"); // Required to fix an IE6 bug when using the Back button (see above tutorial page)
$year=2005;
// Important! You have to include it before your html code
include_once "s:/apache2/htdocs/sml/poll/poll_cookie.php";
?>
and the actual poll is included via the text:
<div style="float: right; margin-right:5em;">
<?php
// Now include the actual poll code
include_once "s:/apache2/htdocs/sml/poll/booth.php";
echo $php_poll->poll_process(4);
virtual("footer.html");
?>
</div>