I have a select input where you can choose multiple options. Unfortunately, I have no clue how to insert the values selected into my database. Here is the code I am trying to use, which is giving me an invalid argument passed on my attempt to implode it.
Thanks for any help...
Here is my php:
$distribs = implode("|", $_POST["distributors"]);
$distribs = mysql_real_escape_string($distribs );
$distribs = mysql_real_escape_string($_POST['distributors']);
$sql="UPDATE customers SET distributors = '$distribs'
WHERE id='$id'";
Here is my select:
echo "<select name='distributors' multiple='multiple'>";
$_POST["distributors"]isn't an array.$_POST["distributors"]??