Jump to content

How can i add stuff after this <?=$_SERVER['PHP_SELF']?>?content=catalog">?


ztealmax

Recommended Posts

Hi how can i add stuff after this

<?=$_SERVER['PHP_SELF']?>?content=catalog">

?

What that does it opens the php document called catalog.php in predefined area "content"

however i would like to have some more stuff after catalog.php like below:

 

catalog.php?brand=<?=$brand?>&model=<?=$model?>

 

ANy idea, or you need more info about what im talking about?

 

//Cheers

ok but does it opens catalog.php in the area Content?

 

or can you explain exactly what your code is doing

 

/cheers

 

this is in my index.php

<?php
if(isset($_GET['content'])){
include($_GET['content'].".php");
} else {
echo " ";
}
?>

 

this is the code i want to show up in area "content"

catalog.php?brand=<?=$brand?>&model=<?=$model?>

 

this is code i useally use to open a document in area "content"

<?=$_SERVER['PHP_SELF']?>?content=catalog">

 

use a switch statement in your content area like so:

 

<?php
$content = $_GET['content'];

switch ($content){
case "catalog":
   include("catalog.php");
   break;
case "page2":
   include("page2.php");
   break;
case "page3":
   include("page3.php");
   break;
default:
   include("catalog.php");
}
?> 

Ok i dont think you guys understand what im talking about ;)

 

allready have the content thing working it opens catalog.php in the content area...however what i need it to do is

add ?brand=<?=$brand?>&model=<?=$model?> behind the link content.php if you see my previus posts you know what im talking about i hope :)

it would be something like this content.php?brand=<?=$brand?>&model=<?=$model?>

 

think you guys can figure out what im talking about ;)

 

ok is it possible to add it like this or something?

<?=$_SERVER['PHP_SELF']?>?content=catalog"+?brand=<?=$brand?>&model=<?=$model?>
>

??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.