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:
Printable View
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:
any1 know :unsure:
Post the script or a link to it here.
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:
Code: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';
Open up admin/config.inc and change the values to reflect your server and database.Code: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';
(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:Code:<?
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)
?>
Then, create a file called .htpasswd with the contents in the following format:Code:AuthUserFile /home/public_html/simplepoll/.htpasswd
AuthGroupFile /dev/null
AuthName Simple Poll
AuthType Basic
require valid-user
For example, if your username is "toco004" and your password is "foo," it would look like this:Code:username:hash_of_password
If you wanted another person named "haxor41789" to access it with the password "bar," it would look like this:Code:toco004:38KOjZwqQSySc
Here is a tool for creating .htpasswd usernames and passwords.Code:toco004:38KOjZwqQSySc
haxor41789:335Bm7iLPDgIs
Hope this helps. :)
thanks so much haxor41789 :)
NP. :)
how can i find my MySql username & password
:lol: I can't tell you, you'll have to ask your host for that.
First of all, does your host even provide you with MySQL?Quote:
Originally posted by toco004@6 April 2004 - 19:55
how can i find my MySql username & password