PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have problem when I want to keep the selected items still selected after posting the page in $_POST[PHP_SELF] form.
It is easy to do it in other form fields but not the multiple selection field. I tried to do it in many ways but it won't work.
after I connect to DB and select the DB, here is the way I tired to do it:
your if has a logic error. You are assigning $_POST['addtool_name'] to $row. == is what you should be using. Additionally, your select has a different name.
But that won't fix your problem. If you named your select "addtool_name[]" then used array_search() to see if $row['addtool_name'] as in $_POST['addtool_name'] it would start working.