Not tested but try:
$sql = <<<EOD
INSERT INTO T_Student(Name, Surname, Street, City, F_ID_Teacher) VALUES('$Name', '$Vorname', '$Strasse', '$Plz', '2');
SET @id = last_insert_id();
INSERT INTO T_Class(Subjekt, Number, F_ID_Student) VALUES('', '', @id);
INSERT INTO T_School(Name, Street, City, F_ID_Student) VALUES('', '', '', @id)
EOD;
Here the student id is retrived by the second query which sets a variable @id
and returns the value in the following queries. It works if the student id is an auto_increment
column type.
More information about the heredoc syntax: