ККК выф ыв ф цу вф

← разместить еще код

Расшаренный код:

	function insert($table,$value) {
        switch ($table){
            case 'student':
                $query = "INSERT INTO student (surname, name, fathername, phone, birthday) VALUES $value"; 
                break;
            case 'teacher':
                $query = "INSERT INTO teacher (surname, name, fathername, phone, birthday, ID_Category) VALUES $value"; 
                break;
        }
		mysql_query($query) or die(mysql_error());   	
	}