rorybing Posted October 16, 2010 Share Posted October 16, 2010 Hi, I'm trying to set up a mysql database on my laptop, XP, and connect to a test database using php. I've created the database called 'testdb' with user account 'test' and password 'password. The code I'm using to try and connect to the test datase is the following; $dbconnect=mssql_connect("localhost", "test", "password"); But when I open the page in a web browser, I am getting the following error; Fatal error: Call to undefined function mssql_connect() in <file_location> I'm hoping I'm doing something simple here, but, I've looked up forums and this seems to be the code to use to connect. Anyone who could help would be greatly appreciated. Thanks. Link to comment https://forums.phpfreaks.com/topic/216003-very-beginner-help-please/ Share on other sites More sharing options...
annihilate Posted October 16, 2010 Share Posted October 16, 2010 You need to use mysql_connect function if you're connecting to a MySQL database. http://php.net/manual/en/function.mysql-connect.php Link to comment https://forums.phpfreaks.com/topic/216003-very-beginner-help-please/#findComment-1122705 Share on other sites More sharing options...
rorybing Posted October 16, 2010 Author Share Posted October 16, 2010 Hi, Thanks for the quick reply, I knew it was gonna be something simple I was doing wrong. Got it connected there. Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/216003-very-beginner-help-please/#findComment-1122706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.