How to code in php to store a one to many relation in mysql database ? (MySQL) : <p>I have two tables. 1) School 2) Student
Each School shall have more than one student. One student can only belong to one school. </p>

<p>I am noob. I don't know the proper php/ajax code to store a new records in mysql database. I am using 2 select boxes. If I am going to choose school in 1st select box then 2nd select box only show the student who enrolled in designated school..</p>
