Ipssissimus
01-30-2010, 11:08 AM
Hi Folks
I'm trying to make life a little easier but not sure if it's possible. I have a php file/web page with products on in divs: The first div below contains some code (highlighted in blue) which points to a single product and opens in it's own web page which works but means I have a web page for every product (500 +). What I would like to be able to do (highlighted in red the second div) is somehow have one webpage containing all products (or at least have them in sections) but be able to have an anchor id to the particular product. If this is possible how then would I anchor to the product in the product web page?
<div class="cat-box">
<a href="index.php?page=archangelicbook" onfocus="if(this.blur)this.blur();"><img class="catimage" src="../images/archangelicbook.jpg">
<h2>Archangelic Book of Ritual & Prayer</h2></a>
</div>
<div class="cat-box">
<a href="index.php?page=angelproductsid=001" onfocus="if(this.blur)this.blur();"><img class="catimage" src="../images/archangeliccards.jpg">
<h2>Archangelic Deck</h2></a>
</div>
All pages are loaded into the index.php which contains the div below:
<div id="middle">
<?php include('php/' . $_GET['page'] . '.php'); ?>
<?php
$page = $_GET['page'];
if (!empty($page)) {
$page .= 'php/'.'.php';
include($page);
}
else {
include('php/home.php');
}
?>
</div>
I'm new to PHP and trying to learn as I go along any help would be greatefully received.
many thanks
Andrew
I'm trying to make life a little easier but not sure if it's possible. I have a php file/web page with products on in divs: The first div below contains some code (highlighted in blue) which points to a single product and opens in it's own web page which works but means I have a web page for every product (500 +). What I would like to be able to do (highlighted in red the second div) is somehow have one webpage containing all products (or at least have them in sections) but be able to have an anchor id to the particular product. If this is possible how then would I anchor to the product in the product web page?
<div class="cat-box">
<a href="index.php?page=archangelicbook" onfocus="if(this.blur)this.blur();"><img class="catimage" src="../images/archangelicbook.jpg">
<h2>Archangelic Book of Ritual & Prayer</h2></a>
</div>
<div class="cat-box">
<a href="index.php?page=angelproductsid=001" onfocus="if(this.blur)this.blur();"><img class="catimage" src="../images/archangeliccards.jpg">
<h2>Archangelic Deck</h2></a>
</div>
All pages are loaded into the index.php which contains the div below:
<div id="middle">
<?php include('php/' . $_GET['page'] . '.php'); ?>
<?php
$page = $_GET['page'];
if (!empty($page)) {
$page .= 'php/'.'.php';
include($page);
}
else {
include('php/home.php');
}
?>
</div>
I'm new to PHP and trying to learn as I go along any help would be greatefully received.
many thanks
Andrew