|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
PHP help accessing mySQL
I am having trouble accessing my database through PHP. I am running on Windows 200 with Apache 2.0.54, PHP 5.0.4 and mySQL 4.1.
When I enter the code: <?php $username = $_POST['username']; $password = $_POST['password']; // Database Variables $DBhost = "localhost"; $DBuser = ""; $DBpass = "password"; $DBname = "testDB"; $tableName = "user"; // Connect to database and select database $DBname. mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database"); mysql_select_db("$DBname") or die("Unable to select database $DBname"); echo("connected to $DBname"); ?> I get the following errors Fatal error: Call to undefined function mysql_connect() in C:serverApache2htdocsWebsitevalidate.php on line 65 I was told to uncomment the ;extension=php_mysql.dll in the php.ini file. What I did was found all the php.ini files located in winnt and windows folder and uncommented it as well as line include_path = ".;C:serverPHPext" in the paths and directories section to point to my php_mysql.dll file. But when I run php I still get the same errors. Anybody know why. Cheers and sorry for long read |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > PHP help accessing mySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|