first commit
This commit is contained in:
29
cms_admin/db_connection.php
Normal file
29
cms_admin/db_connection.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
$servername = "107.155.87.31";
|
||||
$username = "aitoolpath";
|
||||
$password = "WBjexxZJfjzdxhid";
|
||||
$database = "aitoolpath";
|
||||
|
||||
// Create connection
|
||||
$conn = mysqli_connect($servername, $username, $password, $database);
|
||||
|
||||
// Check connection
|
||||
if (!$conn) {
|
||||
die("Connection failed: " . mysqli_connect_error());
|
||||
}
|
||||
|
||||
function sanitize_input($input) {
|
||||
// Remove unwanted characters and potential threats
|
||||
$input = trim($input); // Remove unnecessary spaces
|
||||
$input = stripslashes($input); // Remove backslashes
|
||||
$input = htmlspecialchars($input); // Convert special characters to HTML entities
|
||||
$input = preg_replace("/[\"'<>]/", "", $input); // Remove quotes and angle brackets
|
||||
return $input;
|
||||
}
|
||||
|
||||
|
||||
error_reporting(0); // Disable all error reporting
|
||||
ini_set('display_errors', 0); // Do not display errors on the page
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user