southeastit
asked on
PHP product catalog help
need some help creating a product catalog
website = http://cashzone.seitservices.com.au
currently have it set up as follows
index is setup using the following code
[code]<?php
$page = 'main.php'; // Default page
$pages = array('main', 'about','./products/produc ts','conta ct','new') ;
// Check if p is set
if(isset($_GET['p'])) {
// Check if the page in the url is in the defined array
if(in_array($_GET['p'], $pages)) {
$page = $_GET['p'].'.php';
} else {
$page = 'main.php';
}
}
?>[/code]
products has its own folder
products.php is set up as follows
[code]<?php
$page = 'productsmain.php'; // Default page
$pages = array('productsmain', 'cards','collectables','dv ds','elect ronics');
// Check if p is set
if(isset($_GET['p'])) {
// Check if the page in the url is in the defined array
if(in_array($_GET['p'], $pages)) {
$page = $_GET['p'].'.php';
} else {
$page = 'productsmain.php';
}
}
?>
<table border="0" width="750" height="100%">
<tr>
<td height="100%" width="150" valign="top"><?php include('productcatergory. php');?></ td>
<td height="100%" width="600" valign="top"><?php include($page);?></td>
</tr>
</table>[/code]
productscatergory.php is set up as follows
[code]<a href="./products/products. php?p=card s"><b>Card s</a><br>
<a href="./products/products. php?p=coll ectables"> <b>Collect ables</a>< br>
<a href="./products/products. php?p=dvds "><b>DVDs< /a><br>
<a href="./products/products. php?p=elec tronics">< b>Electron ics</a><br >[/code]
you ca see the results at http://cashzone.seitservices.com.au
obviously i do not want a new page open for the products except I would like them to stay within the original site. I would like it to load in the productsmain section.
If u require me to extend on my explanation please let me know
website = http://cashzone.seitservices.com.au
currently have it set up as follows
index is setup using the following code
[code]<?php
$page = 'main.php'; // Default page
$pages = array('main', 'about','./products/produc
// Check if p is set
if(isset($_GET['p'])) {
// Check if the page in the url is in the defined array
if(in_array($_GET['p'], $pages)) {
$page = $_GET['p'].'.php';
} else {
$page = 'main.php';
}
}
?>[/code]
products has its own folder
products.php is set up as follows
[code]<?php
$page = 'productsmain.php'; // Default page
$pages = array('productsmain', 'cards','collectables','dv
// Check if p is set
if(isset($_GET['p'])) {
// Check if the page in the url is in the defined array
if(in_array($_GET['p'], $pages)) {
$page = $_GET['p'].'.php';
} else {
$page = 'productsmain.php';
}
}
?>
<table border="0" width="750" height="100%">
<tr>
<td height="100%" width="150" valign="top"><?php include('productcatergory.
<td height="100%" width="600" valign="top"><?php include($page);?></td>
</tr>
</table>[/code]
productscatergory.php is set up as follows
[code]<a href="./products/products.
<a href="./products/products.
<a href="./products/products.
<a href="./products/products.
you ca see the results at http://cashzone.seitservices.com.au
obviously i do not want a new page open for the products except I would like them to stay within the original site. I would like it to load in the productsmain section.
If u require me to extend on my explanation please let me know
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
click on products
you will notice a list of product categorys on the left and the products main page on the right
when you click on one of the product catergorys on the left it opens up in the wrong manner
What I would like it to do is if you click on cards it will open up the cards for sale on the right replacing the products main page.
It currently does that but outside of the current layout