I have this function, and it returns Parse error: syntax error, unexpected T_RETURN
. I would appreciate you help me. Thanks.
function getPin(){
return substr(str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ123456789123456789123456789'), 0, 6); ;
}
function validPin(){
$pre = getPin();
$sql = mysql_query("SELECT * FROM `images` WHERE `pin` = '$pre' ");
$count = mysql_num_rows($sql);
if($count > 0){
return validPin();
}else{
return $pre;
}
}
There might not be a closed bracket in earlier lines of code then. You should also clean up your double semicolon on line 11.