Jump to content
php.lv forumi

index.php?page=kautkas&shistas


skrach

Recommended Posts

Sveiki!

 

Man rādās vajadzība izveidot šādu: index.php?page=production&paper

 

pašlaika man ir .

 

$page = (isset($_GET['page'])) ? $_GET['page'] : '';

echo '<ul class="menu">';
echo "<li><a href=\"index.php?page=home\" class=\"" . (($page == "home") ? "current" : "") .  "\">". LANG_MENU_HOME ."</a></li>";
echo "<li><a href=\"index.php?page=production\" class=\"" . (($page == "production") ? "current" : "") .  "\">". LANG_MENU_PRODUCTION ."</a></li>";
echo '</ul>';

if($page == 'home'){
include "index.php";
}

if($page == 'production'){
include "production.php";
}

 

Kāds varētu palīdzēt ?

Edited by skrach
Link to comment
Share on other sites

Palīdzēt ar ko?

Kam būtu jānotiek un kas nenotiek?

 

nu man pašlaik ir poga "Produkcija" index.php?page=production

 

ieejot tajā sadaļā, tur kreisajā menu ir vēl pogas kuras man vajadzētu apmeram tā:

 

index.php?page=production$paper

index.php?page=production&box

 

Nemāku izveidot lai pēc index.php?page=production būtu &paper , kad piespiežu citu linku .

Link to comment
Share on other sites

index.php?page=production&product=paper

index.php?page=production&product=box

 


if($page == 'production')
{
$product = (isset($_GET['product'])) ? $_GET['product'] : '';

switch($product)
{
	case 'paper':
		include "paper.php";
	break;

	case 'box':
		include "box.php";
	break;

	default:
		include "production.php";
	break;
}
}

Link to comment
Share on other sites

index.php?page=production&product=paper

index.php?page=production&product=box

 


if($page == 'production')
{
$product = (isset($_GET['product'])) ? $_GET['product'] : '';

switch($product)
{
	case 'paper':
		include "paper.php";
	break;

	case 'box':
		include "box.php";
	break;

	default:
		include "production.php";
	break;
}
}

 

 

aaaa jāā .. pareizi.. :D :D

Liels liels paldies ka apgaismoji mani.. ;) :D

 

tikai nedaudz savādak.

 

if($page == 'production')
{
       $product = (isset($_GET['product'])) ? $_GET['product'] : '';

       if($product == 'paper'){
	include "paper.php";
	}
}

Edited by skrach
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...