PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
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  
Old August 17th, 2005, 04:37 AM
Carl2k Carl2k is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 Carl2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > PHP help accessing mySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway