write the statements which are used to connect


Write the statements which are used to connect PHP with MySQL?

Statements which can be used to connect PHP with MySQL is:

$conn = mysql_connect('localhost');

echo $conn;

?>

This statement gets the resource of localhost. There are other different ways with which you can connect to database and they are as follows:

mysql_connect('db.domain.com:33306','root','user');

mysql_connect('localhost:/tmp/mysql.sock');

mysql_connect('localhost','rasmus','foobar',

true,MYSQL_CLIENT_SSL|MYSQL_CLIENT_COMPRESS);

?>

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: write the statements which are used to connect
Reference No:- TGS0355078

Expected delivery within 24 Hours