Computer Science, asked by avantikaravikumar, 5 months ago

MySQL connection syntax with example in php​

Answers

Answered by sivasmart2222
0

Answer:

Open a Connection to MySQL

Example (MySQLi Object-Oriented) <? $servername = "localhost"; $username = "username"; ...

Example (MySQLi Procedural) <? $servername = "localhost"; ...

Example (PDO) <? $servername = "localhost"; ...

MySQLi Object-Oriented: $conn->close();

MySQLi Procedural: mysqli_close($conn);

PDO: $conn = null;

Explanation:

HOPE IT HELPS........

Answered by BlurredBlues
2

 \huge \bold \red{answer}

Open a Connection to MySQL

  • Example (MySQLi Object-Oriented) <? $servername = "localhost"; $username = "username"; ...
  • Example (MySQLi Procedural) <? $servername = "localhost"; ...
  • Example (PDO) <? $servername = "localhost"; ...
  • MySQLi Object-Oriented: $conn->close();
  • MySQLi Procedural: mysqli_close($conn);
  • PDO: $conn = null

this is the answer.

Similar questions