What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-26 23:25:04
how to fetch data from database in php
$sql = "SELECT id, firstname, lastname FROM MyGuests"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["i... Add solution -
PHP 2021-09-25 07:29:04
php pdo fetch from db
<?php $sth = $dbh->prepare("SELECT name, colour FROM fruit"); $sth->execute(); /* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return&... Add solution -
PHP 2021-09-23 14:26:03
registation form php
<?php session_start(); // initializing variables $username = ""; $email = ""; $errors = array(); // connect to the database $db = mysqli_connect('localhost', 'root', '', 'registration'); // REGISTER USER if (isset($_POST['reg... Add solution -
PHP 2021-09-12 03:42:02
download image from mysql using php
//You can save this to test.php and call it with test.php?id=1 for example <?php //Database class with PDO (MySQL/MariaDB) require_once("database.php"); //If you need this, write to [email protected] i'll send you the db class //Connect to da... Add solution