php - mysqli_query() Function not working -
mysqli insert $query2 not working no errors. can see going wrong? thanks!
$con = mysqli_connect("localhost", "root", "", "cms"); if(mysqli_connect_errno()) { echo "error: failed connect " . mysqli_connect_errno(); } else { echo "ok: db connected!"; } $query1 = mysqli_query($con, "insert `use` (`first_name`, `last_name`) values ('bob', 'brown')"); $query2 = mysqli_query($con, "insert `users` (`first_name`, `last_name`, `username`, `email`, `password`, `signup_date`, `avatar`, `bio`, `likes`, `url`, `friends`) values ('bob', 'brown', 'bob.brown', 'bobbrown@gmail.com', 'password', 'date', 'bla bla', '0', '0', 'no', '0')");
<?php $con = mysqli_connect("localhost", "root", "", "cms"); // check connection if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } mysqli_query($con, "insert use (first_name,last_name) values ('bob','brown')"); mysqli_close($con); ?>
Comments
Post a Comment