Do you want something like this:
Bad solution, but you can see how to pass a variable
In fac_handler.php:
Change
header("Location: student.php");
to
header("Location: student.php?url=". urlencode($new));
On the student page:
$query="SELECT * FROM " . mysql_real_escape_string($_GET["url"]);
This is a method, but if I where you I would do this on an other way.
How I would do this
Create a ID that you send and resolve that name to the ride database name.