What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-30 14:50:17
database connection in php pdo
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution -
PHP 2021-11-05 21:16:07
Uncaught Error: Call to a member function prepare() on null in C:\xampp\htdocs\facultate\CosCump\product.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\facultate\CosCump\product.php on line 5
try{ $conn = new PDO("mysql: host = localhost; dbname = php_crud", 'root', ''); $pdo = $conn->query("SELECT * FROM data"); $pdo->setFetchMode(PDO:: FETCH_ASSOC); while($row = $pdo->fetch()) {... Add solution -
PHP 2021-11-05 01:10:12
connect php to mysql pdo
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution -
SQL 2021-10-29 16:19:06
test mysql connection
Example (MySQLi Object-Oriented) <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn-... Add solution -
PHP 2021-10-21 22:07:06
pdo db connection
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution -
PHP 2021-10-20 22:18:03
php pdo connection
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution -
Other 2021-10-02 17:10:06
php PDO database connection
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution -
PHP 2021-09-18 07:20:02
php how to connect to db using PDO
<?php $servername = "localhost"; $username = "username"; $password = "password"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception ... Add solution