Pieduriens Posted August 5, 2012 Report Share Posted August 5, 2012 (edited) Sveiki, atkal vēršos pie Jums pēc neliela padoma: Priecājos, ka man ir aizgājis, kā panākt no viena faila, atiecīgi pēc izskauktās adreses attēlot kādu bloku: <?php switch($_GET['page']) { case "all": echo "Pievienojam all bloku"; break; case "add": include 'inc/addpage.php'; break; case "edit": include 'inc/editpage.php'; break; case "delete": echo "Pievienojam delete bloku"; break; default: echo "Nepievienojam nekadu bloku"; } ?> Attiecīgi uzrakstot index.php?page=add tieku pie konkrētā bloka, bet kā būtu jādara, lai varu pie šī pielikt klāt vēlvienu vērtību, lai izsauktu index.php?page=edit?page_id=45 Paldies, par ieteikumiem :) Edited August 5, 2012 by Pieduriens Quote Link to comment Share on other sites More sharing options...
yancho Posted August 5, 2012 Report Share Posted August 5, 2012 (edited) index.php?page=edit&page_id=45¶metrs_2=x¶metrs_3=y Edited August 5, 2012 by yancho Quote Link to comment Share on other sites More sharing options...
Pieduriens Posted August 5, 2012 Author Report Share Posted August 5, 2012 yancho, paldies par atbildi. Es saprotu, kādai tai adresei vajadzētu izskatīties, bet neprotu ar swich/case blokiem pielikt klāt to page_id=45... Quote Link to comment Share on other sites More sharing options...
daGrevis Posted August 5, 2012 Report Share Posted August 5, 2012 `?x=1&y=2` $_GET['x'] == 1; // true $_GET['y'] == 2; // true Quote Link to comment Share on other sites More sharing options...
Pieduriens Posted August 5, 2012 Author Report Share Posted August 5, 2012 Paldies Dagreivis.. Sapratu :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.