vahidrk
کاربر قدیمی پرشین تولز
هرچی فکر کردم نفهمیدم دستور return توی این اسکریپت چه فایده داره.(همراه توضیحاتش می زارم).
It's very useful on websites to have all your code in functions, then use "return" instead of die. For example:
PHP:
function log_in() {
if(!isset($_POST[password])) {
print "You must supply a password.";
return;
}
// rest of the login function here
}
This way it exits out of the function, gives an error message, but doesn't keep the website from finishing loading.