How to get data from a link in custom script

I’m using the education module, in which I have added a field called total marks in the student applicant. Now the total marks depends upon which program (link field) is being selected. For example for college total marks will be 1100 whereas for high school the marks will be 1000. Can someone please help me?