how do I change this page.....

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
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

how do I change this page.....

Post by bruceg »

so that the number of visits displays in the body of the page, but not at the top of the page as it is currently doing.(I only want the results to display in the content part of the page}

You can see what I mean at http://www.inspired-evolution.com/countme.php

Here is the code I am using:

Code: Select all

<?
session_start();
session_register('count');

$_SESSION[count]++;

$msg ="<p>You've been here $_SESSION[count] times. Thanks!</p>";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" dir="ltr">
<head>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
<title>Inspired Evolution :: Count Me</title>
<?php require('includes/meta_tags.inc'); ?>
<link rel="stylesheet" href="Gilbert.css" type="text/css" media="screen, handheld" />
</head>
<body>
<? echo "$msg"; ?>
<!-- begin outer wrapper div --> 

<div id="wrapper_outer">
<a class="skiplink" href="#startcontent">Skip over navigation</a>

<!-- begin header div --> 
<div id="header"><?php require('images/Rotating_Banner/rotating_banner.php'); ?></div>

<!-- top nav list --> 
<div id="navcontainer">
<ul id="navlist">
<li ><a href="About_Me.php" title="you know you want to learn more about me">About Me</a></li>
<li><a href="Skillset.php" title="I've got skillz">Skill set</a></li>
<li><a href="Hireme.php" title="hire me dammit!">Hire Me</a></li>
<li><a href="Portfolio.php" title="see my portfolio!">Portfolio</a></li>
<li><a href="Contact.php"  title="give me a shout">Contact</a></li>
<li><a href="Resume.php"  title="my beautiful resume">R&eacute;sum&eacute;</a></li>
<li><a href="Blog.php"  title="yes, I have one of those too" >Blog</a></li>
<li><a href="RSS.php"  title="RSS (really simple syndication page)" >RSS</a></li>

</ul>
</div>
<!-- inner content wrapper div --> 
<div id="wrapper_inner">

<!-- breadcrumbs div --> 
<div id="breadcrumbs"><a href="index.php" title="home link" accesskey="h">Home</a>  > >  Page Count</div>
<!-- text div --> 
<div id="main_content">
<a name="startcontent" id="startcontent"></a>
<h1 title="Count Me">Count Me</h1>
<? echo "$msg"; ?>
<?php require('includes/bottom_links.inc'); ?></div>

<!-- begin footer --> 
<div id="footer">
<?php require('includes/footer.inc'); ?>
<span class="date"><?
$last_modified = filemtime("index.php");
print("Last Modified ");
print(date("m/j/y h:i", $last_modified));
?></span>
</div>
<p class="footertag">Inspired-Evolution - Web Site: Design, Development, Marketing for Raleigh/Durham, Chapel Hill, Cary, North Carolina.</p>

</div>
</div>

</body>

</html>
TIA!
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Just move line 19

Code: Select all

<? echo "$msg"; ?>
to wherever you want in your html...
bruceg
Forum Contributor
Posts: 174
Joined: Wed Mar 16, 2005 11:07 am
Location: Morrisville, NC
Contact:

Post by bruceg »

oh, I had that line in there twice....duh!
Post Reply