PHP poll

T

TonnyD

I have been trying to install a PHP built poll with mysql and have
been having no luck. I am experimenting with a poll called chipmunk
poll. The problem im having right now is connecting it to the mysql
database. I am using godaddy.com with the 4.1 version. This is the
script on the connect php file;

<?PHP
$db = mysql_connect("localhost", "username", "password") or die("Could
not connect.");
if(!$db)
die("no db");
if(!mysql_select_db("db_name",$db))
die("No database selected.");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{
$_GET = array_map('stripslashes', $_GET);
$_POST = array_map('stripslashes', $_POST);
$_COOKIE = array_map('stripslashes', $_COOKIE);
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}

?>



I replace the text, username, password, and db_name with the proper
information. I have never had success with localhost so I replaced it
with the hostname, "h41mysql59.secureserver.net" I was thinking that
maybe I need to change some permission or something in the database.
The end result i get is a page saying "could not connect." I was able
to install vbulletin in the past just fine so im not sure what the
problem is here. Iv had this same problem with every php poll I try to
install. What do you guys think?
 
T

Thomas A. Rowe

Have you contacted the author of the script(s)?

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
T

TonnyD

yea im waiting for his response, but it is a problem im having with
every sript so it cant be an issue with the script itself.
 
T

Thomas A. Rowe

Have you talked with your web host?

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
T

TonnyD

well come to find out that godaddy does not support php with the
windows operating system.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top