0
Good,
I am tempted that by making a Registration, that Register add in all example users.
table users
id | username
Record to Add:
id_users | movie_id | movie_name
user1 | ex2 | ex2
user2 | ex2 | ex2
user3 | ex2 | ex2
user4 | ex2 | ex2
I’m using this form... Help.
//$uploadOk = false;
$titulo = $_POST['movie_serie'];
$direct = $_POST['movie_dir'];
$db_dir = "libraries/images/upload/".$direct.".jpg";
//$query = mysqli_query($con, "INSERT INTO movies (movie_id, movie_name) VALUES ('$db_dir', '$titulo')");
$select = "SELECT username FROM users";
$queryS = mysqli_query($con, $select);
while($row = mysqli_fetch_array($queryS))
{
$u_array = array('username' => $row['username'], 'movie_id' => $_POST['movie_dir'], 'movie_name' => $_POST['movie_serie']);
$query2 = mysqli_query($con, "INSERT INTO movies_notify (id_users, movie_id, movie_name)
VALUES ($u_array)");
}
If on the table
movies_notify
you must insert theid
user, why you just select theusername
? And you can’t pass one array for the SQL statement, you will need to convert it to string.– Woss