Answer the question
In order to leave comments, you need to log in
Why does the script insert several rows into the database at once instead of one?
Hello!
The problem is this:
$db = new mysqli("localhost", "root", "", "qb_test");
$query = "INSERT INTO mytable (`FirstName`, `LastName`, `Phone`) VALUES (?, ?, ?);";
$stm = $db->prepare($query);
$first = "Vasya";
$last = "Pupkin";
$tel = "123456";
$stm->bind_param("sss", &$first, &$last, &$tel);
$stm->execute();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question