Ok, heres my script (PHP) im trying to use to make a counter (gets count from database, adds 1, puts that back in database, and shows the number) but, i have an error somewhere (I get a blank page) but i cant find it, any help?
<?php
$user = "user";
$host = "host";
$password = "password";
$database = "database";
$connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$query = "SELECT Counter FROM Counted";
$result = mysql_query($query,$connection)
or die("Couldn't execute query.");
$Counter = +1;
echo $Counter;
$query = "SELECT Counter FROM Counted";
$query = "UPDATE Counted WHERE Counter = '$Counter'";
or die ("Couldn't execute other query.");
?>
Submit Your Article
Forum Rules

Reply With Quote