Jump to content

Connecting to Database


Sweets287

Recommended Posts

Help, read previous posts but still can't connect to the database, using a php file on an include to connect and then selecting what I need on pages afterwards.

 

<?php # Script 12.4 - mysql_connect.php

 

// This file contains the database access information. This file also establishes a connection to MySQL and selects the database.

 

// Set the database access information as constants.

$Host = 'Host';

$User = 'User';

$Password = 'Password';

$DBName = 'DBName';

 

$Link = mysql_connect ($Host,$User,$Password);

 

 

?>

 

But comes up with the following error msg -Fatal error: Call to undefined function mysql_connect()

 

 

Link to comment
https://forums.phpfreaks.com/topic/99341-connecting-to-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.