30 lines
		
	
	
		
			862 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			862 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?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
 | |
| 
 | |
| 
 | |
| ?>
 | 
