if(isset($_POST['usersadded'])){
$value = $_POST['usersadded'];
$lines = explode("\n", $value);
foreach ($lines as $line) {
mysql_query("INSERT INTO Users_$support (Users) VALUES ('$line')");
};
I have a valid connection to the database already, so it’s not that that’s wrong. But it never submits anything 🙁
$support is a number, e.g. 19.
I would always suggest using this SQL syntax when inserting something with PHP variables inside.
The error might appear when you don’t phrase your PHP variables correctly inside the query string.