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) not null)"); $sql = "INSERT INTO users (uidUsers, emailUsers, pwdUsers) VALUES (?, ?, ?)"; $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt, $sql)) { header("Location: ../Signup.php?error=sqlerror"); exit(); } else { $hashedPwd = password_hash($password, PASSWORD_DEFAULT); mysqli_stmt_bind_param($stmt, "sss", $username, $email, $hashedPwd); mysqli_stmt_execute($stmt); header("Location: ../Signup.php?signup=success"); # exit(); } var_dump($mysqli->query("SELECT * FROM users")->fetch_assoc());
Show:  
Copy Clear