View Full Version : Simple Poll Script
toco004
04-04-2004, 11:47 PM
ok i want to install a Simple Poll script but in the readme
it says
"Paste the contents into a tool that can execute SQL commands for your MySQL DB"
What tool can execute SQL commands to your MySQL DB? :huh: :helpsmile:
toco004
04-05-2004, 12:42 AM
any1 know :unsure:
Post the script or a link to it here.
toco004
04-05-2004, 05:14 AM
its a php thoe. here it is http://www.hotscripts.com/Detailed/25284.html
The easiest way would be to install phpMyAdmin on your server and run the following queries:
DROP TABLE IF EXISTS `poll`;
CREATE TABLE `poll` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) default NULL,
`question` varchar(255) default NULL,
`bgcolor` varchar(20) default NULL,
`fontsize` varchar(10) default NULL,
`font` varchar(50) default NULL,
`fontcolor` varchar(20) default NULL,
`orientation` varchar(100) default NULL,
`tbgcolor` varchar(20) default NULL,
`tfontsize` varchar(10) default NULL,
`tfontcolor` varchar(20) default NULL,
`tfont` varchar(50) default NULL,
`votes` int(11) default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT='Simple Poll';
DROP TABLE IF EXISTS `choices`;
CREATE TABLE `choices` (
`id` int(11) NOT NULL auto_increment,
`pollid` int(11) NOT NULL default '0',
`choice` varchar(255) default NULL,
`barcolor` varchar(20) default NULL,
`votes` int(11) default '0',
PRIMARY KEY (`id`),
KEY `pollid` (`pollid`)
) TYPE=MyISAM COMMENT='Simple Poll';
Open up admin/config.inc and change the values to reflect your server and database.
<?
define(hostname,"localhost"); // mysql server host name
define(dbname,"FreePhpNet"); // mysql database name
define(username,""); // mysql user name
define(password,""); // mysql password
define(templatedir,"/home/public_html/simplepoll/templates/"); // directory where templates are located (must end foward slash)
define(simplepollurl,"/simplepoll/"); // url to the script main directory (must end foward slash)
?>
(Apache servers only from now on) To limit access to your admin directory, create a file called .htaccess and put in the poll's directory:
AuthUserFile /home/public_html/simplepoll/.htpasswd
AuthGroupFile /dev/null
AuthName Simple Poll
AuthType Basic
require valid-user
Then, create a file called .htpasswd with the contents in the following format:
username:hash_of_password
For example, if your username is "toco004" and your password is "foo," it would look like this:
toco004:38KOjZwqQSySc
If you wanted another person named "haxor41789" to access it with the password "bar," it would look like this:
toco004:38KOjZwqQSySc
haxor41789:335Bm7iLPDgIs
Here (http://www.euronet.nl/~arnow/htpasswd) is a tool for creating .htpasswd usernames and passwords.
Hope this helps. :)
toco004
04-05-2004, 06:49 AM
thanks so much haxor41789 :)
toco004
04-07-2004, 03:55 AM
how can i find my MySql username & password
:lol: I can't tell you, you'll have to ask your host for that.
Mr. Blunt
04-07-2004, 09:15 PM
Originally posted by toco004@6 April 2004 - 19:55
how can i find my MySql username & password
First of all, does your host even provide you with MySQL?
Originally posted by Mr. Blunt+7 April 2004 - 16:15--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Mr. Blunt @ 7 April 2004 - 16:15)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-toco004@6 April 2004 - 19:55
how can i find my MySql username & password
First of all, does your host even provide you with MySQL? [/b][/quote]
:lol:
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.