PDA

View Full Version : WAMP?



Luke
06-03-2008, 04:56 PM
What are the mysql connection details for wamp, and is there a little php script to test that it's connected?

Thanks
Luke

Florx
06-03-2008, 06:09 PM
Server: localhost
Username: root
Password: not set unless you specified one
Database: create one :)

Hypertext
06-03-2008, 06:21 PM
<?php

$host = 'x';
$user = 'x';
$pass = 'x';
$dbname = 'x';
if(mysql_connect($host, $user, $pass)) {
if(mysql_db_select($dbname)) {
echo "Connected!";
} else {
echo "db not working!";
}

echo "none of it working!";

}
?>

wamps great :)

Luke
06-03-2008, 06:30 PM
Fatal error: Call to undefined function mysql_db_select() in C:\wamp\www\test.php on line 8

Blob
06-03-2008, 06:35 PM
Fatal error: Call to undefined function mysql_db_select() in C:\wamp\www\test.php on line 8

mysql_select_db();

Luke
06-03-2008, 07:02 PM
thanks

+rep to all

Hypertext
06-03-2008, 07:52 PM
my bad ;)

Want to hide these adverts? Register an account for free!