just an idea, in facultyinfo.php, have a function that does the operationg you want, and simply turn it on with the link, such as
link.php?task=java
//inside the page
switch($task){
case "java":
java_function();
break;
then, what ever else you want, or close it off with a
}