PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $conn = $mysqli; $mysqli->query("create table users (uidUsers int, emailUsers int, pwdUsers varchar(100))"); $sql = "INSERT INTO users (uidUsers, emailUsers, pwdUsers) VALUES (?, ?, ?)"; $stmt = mysqli_stmt_init($conn); mysqli_stmt_prepare($stmt, $sql); $hashedPwd = password_hash('some pass', PASSWORD_DEFAULT); mysqli_stmt_bind_param($stmt, "sss", $username, $email, $hashedPwd); mysqli_stmt_execute($stmt); var_dump($mysqli->query("SELECT * FROM users")->fetch_assoc());
Show:  
Copy Clear