hey there, i recently installed php5.0.2, apache2.0 and mysql4.1 independently but got them to work together. however i can only access a database when i type:

$db = new mysqli('localhost','username','password','database');

and yet when i try:

$db = mysql_connect('localhost','username','password');

it does not work, i have uncommented the extension in my php.ini and copied the appropriate files to my php directory. what could be the problem.please help me.thanks

I'm not expert on DB's but as far I know mysqli was designed to improve DB functionality. By the description which you gave it does look like your DB is set to use msqli and there for will not accept the other request. More info about mysqli setup, use and some exampes can be found here http://uk3.php.net/mysqli (also there is easier way to set DB+PHP+server look for XAMPP)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.