Saturday, 15 May 2010

show new info on list click PHP -


I have a PHP page, which creates list-items when a form is submitted, form 5 in the form text If the value sends, two first values ​​of the form are sent back and are displayed in the list element, it looks like:

  $ myFile = 'demo.txt'; $ Content = file ($ myFile); $ Content_array = Explosion ("/ n", $ content); & Lt; Ul id = "list" & gt; & Lt ;? For php ($ i = 0; $ i & lt; count ($ content_array); $ i ++) {$ value = explosion (';', $ content_array [$ i]); $ Heading = $ value [0]; $ Grade = $ value [1]; $ Link = $ value [2]; $ Pic = $ value [3]; $ Desc = $ value [4]; & Lt; Li '& gt;' $ Titel '& Lt; Span & gt; ' $ Grade '& Lt; / Span & gt; & Lt; / Li & gt; ';}? & Gt; & Lt; / Ul & gt;   

I do not know that to make the list element clickable and when you click all the values ​​in the content_ar, it should be displayed and the list should be missing, Still the same page (index.php) but if you click on the first list-element then it is index.php? Page = First and second list-element index.php? Page = second and should be the same .. I think I should use the $ _ GET ['page'] in any way but I do not know much PHP, if If someone knows me in the right direction or knows any online manual for this then I will be happy! <

$ I & lt; Count ($ content_array); $ I ++) {$ value = explosion (';', $ content_array [$ i]); $ Heading = $ value [0]; $ Grade = $ value [1]; $ Link = $ value [2]; $ Pic = $ value [3]; $ Desc = $ value [4]; Echo '& lt; Li & gt; Echo '& lt; A href = "index.ph p? Page = '$ I. & lt; / li & gt;'}}? & Gt;; & gt; 'echo $ title'. & Lt; span & gt; $ Grade. '& Lt; / span & gt; Echo '& lt; / a & gt; & lt; / ul & gt;

Use this to use this page:

  & Lt ;? php $ page = $ _GET ['page']; if ($ page === '0') {// do you want to first page}? & Gt;    

No comments:

Post a Comment