// Remove from the database all checked events
if (isset($_POST['entry_id'])) {
foreach($_POST['entry_id'] as &$entry_id){
$entry_id = mysql_real_escape_string($entry_id);
}
$sql =...
Does that post what you'd expect or not(not looking through the file without it being commented or very well formatted, so I'm going to just try narrowing the error...
Normally it's used to run clean up, for example if you have a class that needs to lock a table while it's there for some reason then you'd unlock the tables on destruction.
Not really, the database server would always be running, in order to pull info from it you need to establish a connection and submit the query(username, password etc are optional for some databases)....
I'd take a look at the actual insert query, using the line I posted earlier( die....), see what is actually being passed, if that looks fine check your database structure, might be you've not set the...
Having looked at this code again on a real computer I realised a few minor security problems.
And on that note I'd probably change your function to something more like: