Hi there... I keep getting the folowing eror when running this script;
Parse error: parse error in /usr/local/psa/home/vhosts/pagadoo.com/httpdocs/header.php on line 25
Any1 know why. I believe like 25 is;
if(mysql_num_rows($query) = 0) {
Anny help would be great.
<?php
$DBhost = "localhost";
$DBuser = "jdunn";
$DBpass = "55555";
$DBname = "55555";
$date = date("m d y");
$cn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
mysql_select_db ($DBname);
session_register("logged_in");
if ($logged_in == "1") {
session_register("user_name");
$status = $user_name;
$status2 = "<a href='http://www.pagadoo.com/forums/logout/logout.php?'><font face='Arial, Helvetica, sans-serif' size='1' color='#FFFFFF' style='text-decoration:none'>Log-Out</a></font>";
} else {
$status = "Guest";
$status2 = "<a href='http://www.pagadoo.com/forums/login/login.php?'><font face='Arial, Helvetica, sans-serif' size='1' color='#FFFFFF' style='text-decoration:none'>Log-In</a></font>";
}
$usercount = mysql_query("SELECT * FROM pagadoo_users",$cn);
$usercount = (mysql_num_rows($usercount));
$query = mysql_query("SELECT date FROM pagadoo_hits where date='$date''",$cn);
if(mysql_num_rows($query) = 0) {
$query = mysql_query("INSERT INTO pagadoo_hits (date, hits) VALUES ('$date', '1')",$cn);
$todayshits = "1";
} else {
mysql_query("UPDATE pagadoo_hits SET hits=hits+1 where date='$date'");
$todayshits = mysql_query("SELECT * FROM pagadoo_hits where date='$date'",$cn);
$todayshits = (mysql_num_rows($todayshits));
}
?>
By the way, how would i select a whole column in my sql, and add the values of all the colums up?
Thanx