Jump to content
php.lv forumi

Vairāki Geti urlā


Pieduriens

Recommended Posts

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 by Pieduriens
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...