Helloall
I am trying to make a simple counter and am having trouble connecting to my database i think :-s
<?php
session_start();
include 'dbconnect.inc.php';
if (!session_is_registered("counted")){
mysql_query("UPDATE simplecount SET count=(count + 1) WHERE count_id=1");
session_register("counted");
}
?>
dbconnect.in.php
<?php
$host = "localhost";
$username = "root";
$pass = "";
$database = "mysql";
mysql_connect($host,$username,$pass);
mysql_select_db($database);
?>
Now I am WoNdErIng that my 'simplecount' table has been under a database called 'mysql'
-How do I go about defining that
or
- has that been done right?
The Original file now runs ok(ie. no error on page) however when I browse the Sql table 'simplecount' after refreshing the page a coupe of times, the id's their have not been updated to say if any one has been or not.