Can anyone give mi the connectivity code for PHP?

Started by Fabio, November 17, 2016, 07:04:54 PM

Previous topic - Next topic

Lee

Hello everyone, I would like to ask you if you can tell me can anyone give mi the connectivity code for php? Thank you please reply to the message!

Vincent

PHP will require that mysqli is enabled (it is on most PHP set ups).

<?php
//Step1
$db = mysqli_connect('localhost','username','password','database_name')
or die('Error connecting to MySQL server.');
?>

<html>
<head>
</head>
<body>
<h1>PHP connect to MySQL</h1>
</body>
</html>