Is this PHP Script well protected?
I'd like to know if the script is ok against mysql injections and other vulnerabilities?
The following sections has many security features.
I'm wondering if this makes any sense ? 
 

     <?php
    
    function checkValues($value)
    {
    
    	//Trim the value
    	 $value = trim($value);
    	 
    	// Stripslashes
    	if (get_magic_quotes_gpc()) {
    		$value = stripslashes($value);
    	}
    	
    	// Convert all &lt;, &gt; etc. to normal html and then strip these
    	 $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));
    	
    	 // Strip HTML Tags
    	 $value = strip_tags($value);
    	
    // Quote the value
    	$value = mysql_real_escape_string($value);
    	return $value;
    	
    }	
    
    include ('connect.php');
    
    $requete = checkValues($_REQUEST['url']);
    
    
    $requete = mysql_query('SELECT * FROM table WHERE url="'.$_GET['url'].'"') or die(mysql_error());
    
    
    if(mysql_num_rows($requete)=='0'){
    
     header('Location: /website/index.php');
    
    }else{
    
    	while($resultats = mysql_fetch_array($requete)){ 
    
    	
    
    	}
    }
    
    mysql_close(); 
    
    ?>

According to you, is this alright?

If not, can you please tell what goes wrong with that?


Thank you
Is this PHP Script well protected?
===

I'd like to know if the script is ok against mysql injections and other vulnerabilities?
The following sections has many security features.
I'm wondering if this makes any sense ? 
 

     <?php
    
    function checkValues($value)
    {
    
    	//Trim the value
    	 $value = trim($value);
    	 
    	// Stripslashes
    	if (get_magic_quotes_gpc()) {
    		$value = stripslashes($value);
    	}
    	
    	// Convert all &lt;, &gt; etc. to normal html and then strip these
    	 $value = strtr($value,array_flip(get_html_translation_table(HTML_ENTITIES)));
    	
    	 // Strip HTML Tags
    	 $value = strip_tags($value);
    	
    // Quote the value
    	$value = mysql_real_escape_string($value);
    	return $value;
    	
    }	
    
    include ('connect.php');
    
    $requete = checkValues($_REQUEST['url']);
    
    
    $requete = mysql_query('SELECT * FROM table WHERE url="'.$_GET['url'].'"') or die(mysql_error());
    
    
    if(mysql_num_rows($requete)=='0'){
    
     header('Location: /website/index.php');
    
    }else{
    
    	while($resultats = mysql_fetch_array($requete)){ 
    
    	
    
    	}
    }
    
    mysql_close(); 
    
    ?>

According to you, is this alright?

If not, can you please tell what goes wrong with that?


Thank you