For that specific problem, don’t close the database connection if you didn’t open it - so put the
close() inside the
if() clause as well. Or don’t call
close() at all, when your script ends it will automatically be closed.
$_POST issue, as I said earlier, get rid of that
<a href> part and put the destination in your form tags, in the
action parameter. Then see if you get data in the
You can ignore the error about closing the database connection for now, because I think that’s only happening because your
$_POST data isn’t coming through from the form.