PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Hit Counter Code giving ERROR Posted by vishalonne on 3 Aug 2012 at 1:35 AM
Hi All
I am getting an warning on my web page when I uploaded the page on server I just writing a PHP PAge Hit Counter-
<!-- Start counter code -->

<a href="http://smurf-game.com" target="blank" >
<img alt="Website counter" hspace="0" vspace="0" border="0" src="http://hitmaze-counters.net/5847121-73AB00A30823766D419F7145D3021560/counter.img?theme=1&digits=7&siteId=7"/>
</a>
<noscript><br/><a href="http://smurf-game.com">smurf-game.com</a><br>The following text will not be seen after you upload your website, please keep it in order to retain your counter functionality <br> <a href="http://www.imdb.com/video/demo_reel/vi3041172761/" target="_blank">reelhd.com</a></noscript>

<!-- End counter code -->

Here is the Code -
Counter.php
<?PHP
session_start();
if(isset($_SESSION['views'])){
$_SESSION['views'] = $_SESSION['views']+ 1;
}else{
$_SESSION['views'] = 1;
}
echo "Total page views = ". $_SESSION['views'];
?>

And I used it like this in Survey_Form.php
<div class='sfm_cr_box' style='padding:3px; width:350px'>
<?php
echo "<hr><div align=\"center\">";
include_once "counter.php"; // this will include the counter.
echo "</div>";
?>
</div>

What is the problem with the code



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.