what does this mean in php please?

Discussion in 'PHP' started by hardrevenge, Oct 26, 2008.

  1. #1
    	if(isset($sum) and md5($sum)=="4819a994e94e212e65f8d38060f9ad34"){
    		$switch=2;
    		include "upgrade.php";
    	}
    	else{
    
    function get_list_by_tag
    PHP:
    please what does this code mean ?:confused:
     
    hardrevenge, Oct 26, 2008 IP
  2. devji

    devji Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The top line is effectively checking if the parameter $sum is set 'isset' and together with the md5 part is checking if the value of $sum is a certain value. md5 is kind of security command that returns the hash value and is used to encrypt sensitive data such as passwords. If the value matches the hash, the file 'upgrade.php' is executed and $switch is set to 2. What these last two parts do is impossible to tell without seeing the entire code.
     
    devji, Oct 26, 2008 IP