title: How to join two tables to fetch common values
body: <p>I am just learning PHP. I have two tables one is table a and other is table b. Fields of table  a are:
   <code>snum, sfirst, smiddle, slast</code>. and Fields of table b are :
   <code>sr_no, st_id</code>. Here Table a's <strong>snum</strong> and table b's <strong>st_id</strong> have common values that is id of student. I want to join both tables and find out sfirst, smiddle, slast according to this id. I want to insert id in database and fetch names sfirst, smiddle, and slast according to st_id  of table b. Please guide me how can I solve it in easiest way?</p>