Sunday 15 March 2015

PHP - Drop down list to display .txt contents -


I have a form in which the song is a drop down list of titles, I am able to click on the title of a single song I want to be and the song has to be loaded on the same page. Songs in .txt files are included in a folder called "songs".

Example:

included in the drop down list: Song 1 Song 2 Song 3 and so on.

When the user clicks on the song, appears on the same page content corresponding .txt file. any idea?

  & lt ;? PHP $ Song = Intwal ($ _get [ 'Sang_id']); $ Songs = array (0 = & gt; NULL, 1 = & gt; song1 ', 2 = & gt;' Song2 ', 3 = & gt;' Song 3 '); Echo file_get_contents ($ Lyrics [$ song]. '.txt'); ? & Gt;  

Good luck!


No comments:

Post a Comment