Currently, I have some code like this:
if (is_dir($student_filepath))
{
check_attachment_limit($userfile, $student_filepath);
}
else if ($userfile_size/1024 > 1024)
{
echo "file too large";
delete_all_existing_files($dir);
}
Now, I have to use the alert function in javascript to replace to echo. so, i want to ask:
(1). how can i link from the end of else if statment to the javascript function?
(2). how can i link it back to my php module?
thanks a lot.
kelvin