$k stands for the key, or element, name. $v stands for the value.
so this line:
$_SESSION[$k] = $v;
creates a session that has the name of the form elements, and sets the value of the session to the value of the form element.
so your S_teacherName form element gets stored in a session named S_teacherName with the value that was posted.