I have a webpage I am trying to put my own counter on. I have this webpage in the same folder as my counter2.php. I built a different php page to call the counter and it works so I know my include statement and my counter code is correct. But it will not work inside the body of my webpage where I want it . Here is where I am trying to put it
<h2>Visitors to our site.</h2>
<?php
include 'counter2.php' ;
?>
<?php
// Connects to your Database
mysql_connect("localhost", "db_user", "Password") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
//Adds one to the counter
mysql_query("UPDATE counter SET counter = counter + 1");
//Retreives the current count
$count = mysql_fetch_row(mysql_query("SELECT counter FROM counter"));
//Displays the count on your site
print "$count[0]";
?>
Also I figured out my problem I had to save my page as index.php instead of .html thanks for trying to help:D