如何在mysql和php中切换Session 2012-13,2013-14 ......等等? [关闭]

I want to create a page in php and mysql that opens data related to 2012-2013 if I select session 2012-2013. and if I select session 2013-2014 it should select another database related to 2013-14. can it be possible? A company can have many years of data so how to select them by sessions?

yes of course!
on the page you select the session by using any type of INPUT method like a dropdown box.

on the next page where the database has to be opened use the
if-else structure to choose the database name and then use mysql_select_db($sessionname).

sample code is as under:

on first page where you select session.

  <select name="mysession">   
     <option value="ses1213" selected>Session 12-13</option>            
     <option value="ses1314" selected>Session 13-14</option>   
  </select>    

on next page write following PHP line while selecting database you want to open.

  mysql_select_db($_POST["mysession"]);    

here i assume that the ses1213, ses1314 are the names of databases in mysql.