
June 13th, 2003, 06:17 AM
|
|
Junior Member
|
|
Join Date: Jun 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
voting poll problems
firstly thanks mitch for writing an easy to follow article on creating a voting poll.
but... i couldn't get it working as expected, and being new to this php thing, i'm struggling to work out why.
managepoll.php wouldn't connect to the database when trying to add or delete a poll.
the problem seems to be with the '@$svrConn = ...' and '@$dbConn = ...' lines.
my (isp provided) mySQL control panel produced this connection script:
PHP Code:
$dbh=mysql_connect ("localhost", "my_db_name", "my_password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("my_db_name");
once i replace mitch's code with this, everything works fine, but can someone explain why?
thanks in advance.
pete
|