Reputation: 75
$sql9 = "INSERT INTO Already_Selected (AL_S) VALUES ('$text4, $text3, $text2, $text1, $text')";
so basically my issue is when inserting in to the database $text, $text1, $text2
etc all insert in the same row so the look like this in the database
B20609, B30329, A10427, A10303, A10201
i need them to insert on a new row each time so they look like
B20609
B30329
A10427
So they look like that in the database. Basically at each comma i need a new row
Upvotes: 1
Views: 36
Reputation: 12246
You can do it like this:
$sql9 = "INSERT INTO Already_Selected (AL_S)
VALUES ('$text4'), ('$text3'), ('$text2'), ('$text1'), ('$text')";
Upvotes: 2