$_POST['db_name'] = str_replace('"', '', $_POST['db_name']); $dbConnections->db_name = $_POST['db_name']; $_POST['db_username'] = str_replace(' ', '_', $_POST['db_username']); $_POST['db_username'] = str_replace('\'', '', $_POST['db_username']); $_POST['db_username'] = str_replace('"', '', $_POST['db_username']); $dbConnections->db_username = $_POST['db_username']; $_POST['db_password'] = str_replace(' ', '_', $_POST['db_password']); $_POST['db_password'] = str_replace('\'', '', $_POST['db_password']); $_POST['db_password'] = str_replace('"', '', $_POST['db_password']); $dbConnections->db_password = $_POST['db_password']; //change the "select_list_connection_form_value" property (this denotes which connection is shown as selected in the select menu) $dbConnections->select_list_connection_form_value = $_POST['db_connection_list']; //is this a DATABASE CONNECTION DELETION request? if ($_POST['delete_db_connection'] == 1) { // call this method echo $dbConnections->DeleteDBConnection(); //echo out this message $dbConnections->return_message; //stop the rest of the script return; } // this means we are creating a new one if ($_POST['db_connection_list'] == '1') { if ($dbConnections->db_connection_name == '') { //return an error message..and do nothing else! $error_messages = 'Please Enter the Database Connection Name and then press the "Save / Test" button'; } elseif ($dbConnections->db_host == '') { //return an error message..and do nothing else! $error_messages = 'Please Enter the Database Host and then press the "Save / Test" button'; } elseif ($dbConnections->db_name == '') { //return an error message..and do nothing else!