PHP භාවිතා කරමින් දත්ත සමුදාය සම්බන්ධ කරන්නේ කෙසේද? | How To Connect Database Using PHP | Beginners
►Enjoyed? - Like 👍, Comment & Subscribe with 🔔 on :). I have many more videos on (https://www.youtube.com/channel/UC4RKkr8UcFSR3MJPOSQan3g?sub_confirmation=1) my channel.
Definition and Usage
The connect() / mysqli_connect() function opens a new connection to the MySQL server.
Syntax
Object oriented style:
$mysqli == new mysqli(host, username, password, dbname, port, socket)
Procedural style:
mysqli_connect(host, username, password, dbname, port, socket)
Parameter Values
Parameter Description
host Optional. Specifies a host name or an IP address
username Optional. Specifies the MySQL username
password Optional. Specifies the MySQL password
dbname Optional. Specifies the default database to be used
port Optional. Specifies the port number to attempt to connect to the MySQL server
socket Optional. Specifies the socket or named pipe to be used
Technical Details
Return Value: Returns an object representing the connection to the MySQL server
PHP Version: 5+
#Pruthuwe #programmingInSinhala #phpInSinhala