I want to create a form that should have a textarea as bulk input, then every row of that textarea can be store able as separate value in table via PHP.
What should I do?
I want to create a form that should have a textarea as bulk input, then every row of that textarea can be store able as separate value in table via PHP.
What should I do?
The key piece of code is:
$values = explode("\n", $_POST['textarea_name']);
Don't forget to sanitize your inserts :)
I use this code
$values = explode("\n", $_POST['textarea_name']);
mysqli_query($con,"INSERT INTO `table` (`col`) VALUES ($values)");
data should be string. How I can convert it to string? I want to make each row to a record! make my code compelet!