hi there,
i have few question regarding the return statement.
a) is it compulsory to define a return statement in a user defined function.?
b) is it still valid if i just define a return statement without any parameter? will it return the null value?
c) is the following function valid?
function admin_credential($password = 0, $email = 0) {
if( $password != 0) {
$password = sha1($password);
$query = "UPDATE admins SET password = '$password'";
$result = mysql_query($query);
}
if( $email != 0) {
$query = "UPDATE admins SET email = '$email'";
$result = mysql_query($query);
}
return;
}