I want an introduction to appear only on the homepage

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jeeremie
Forum Newbie
Posts: 5
Joined: Mon Jul 23, 2007 11:53 am

I want an introduction to appear only on the homepage

Post by jeeremie »

Hello,

I am using a simple online commerce system and I need to have an introduction (image+text) that will only appear on the home page (see demo).

I already created a file called intro.php.

Any ideas?

Thanks in advance.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

Try explaining what you want to do more clearly. It sounds like you have a PHP-based commerce package that you want to modify. If you're not a PHP programmer, that's going to be hard to do. But, specifically, what do you mean by "I need to have an introduction (image+text) that will only appear on the home page"? The answer that springs to mind is "just put the image and text on the page you want it to appear on", but that's going to sound sarcastic. If you have a set of scripts that you want to customize, I don't think you'll find anyone who's willing to do all the work required to analyze your existing scripts and rewrite them for you.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

You just make it.

I'm failing to see an issue.
User avatar
jeeremie
Forum Newbie
Posts: 5
Joined: Mon Jul 23, 2007 11:53 am

let's be clear!

Post by jeeremie »

Ok, i will try to explain it better.

The index page call the categories and then when one click on one of the categories, it open up the products page and so on until checkout. checkout is a different page (checkout.php). But before, everything loads on the same page (index.php).
So, if I add my intro (basically, it is an image and text contained by a DIV) into my index.php, users will see this intro everytime they check the products.

I don't want this!

I just want the intro to appear when they first load the website and everytime they go back to the homepage.

Does it make things clearer?

In case not, you can see the index.php below:

Code: Select all

<?php
require_once 'library/config.php';
require_once 'library/category-functions.php';
require_once 'library/product-functions.php';
require_once 'library/cart-functions.php';

$_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI'];

$catId  = (isset($_GET['c']) && $_GET['c'] != '1') ? $_GET['c'] : 0;
$pdId   = (isset($_GET['p']) && $_GET['p'] != '') ? $_GET['p'] : 0;

require_once 'include/header.php';
?>

  <?php require_once 'include/top.php'; ?>
  
  <?php require_once 'include/leftNav.php'; ?>
  
  		<div id="content"> 				
			<div class="text">

                                <!--******-->
                                <!--I need to add the intro here!-->
                                <h1>Handmade Dolls <span>for Key-Ring by Ann</span></h1>
			         <div class="text">
				        <img class="center" src="images/intro.jpg" />
				        <big class="center">Welcome to Hailstorm Design!</big>
			        </div>
			<!--Intro-->
                                <!--******-->


				<?php
				if ($pdId) {
					require_once 'include/productDetail.php';
				} else if ($catId) {
					require_once 'include/productList.php';
				} else {
					require_once 'include/categoryList.php';
				} 
				?>  
			</div>		
		</div>
		<!--/Content-->
	
	
  
  <?php require_once 'include/rightNav.php'; ?>
  
  <?php require_once 'include/footer.php'; ?>
Post Reply