What do you want to save?
Add Code snippet
New code examples
-
-
PHP 2022-03-19 11:45:02
shopping cart php pdo mysql ajax
<?php /** * @package Cart class * * @author TechArise Team * * @email [email protected] * */ include("DBConnection.php"); class Cart { protected $db; &... Add solution -
PHP 2022-03-17 04:55:13
retrieve 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 -
Other 2022-03-03 01:35:14
code for searching and displaying data database
<?php // (A) DATABASE CONFIG - CHANGE TO YOUR OWN! define('DB_HOST', 'localhost'); define('DB_NAME', 'test'); define('DB_CHARSET', 'utf8'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); // (B) CONNECT TO DATABASE try { $pdo = new PDO( &q... Add solution -
PHP 2022-02-28 19:55:07
php mysql update all rows in table random values
$idresult = $conn->query("SELECT id FROM pictures"); while ($row = $idresult->fetch_assoc()){ mysqli_query($conn, "UPDATE pictures SET UniqueKey = '$UniqueKey' WHERE id = " . $row['id']; } Add solution -
PHP 2022-02-24 17:05:02
how to make a sign-up database
<?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 2022-02-19 08:20:02
jquery get data from php
You can read about ajax in javascript and make an ajax request that gets the json object from PHP then process that in your javascript: Example (with some improvement to your PHP code) PHP $chart6 = $controller->runQuery("SELECT DATE(pay_date... Add solution -
PHP 2022-02-18 03:30:22
csv upload query in php
<?php // Load the database configuration file include_once 'dbConfig.php'; // Get status message if(!empty($_GET['status'])){ switch($_GET['status']){ &... Add solution