Hi, can someone tell me what im doing wrong here?
<?php
$con = mysql_connect("host","user","pass"
;
mysql_select_db("db",$con);
$pagename = "fred"; //change this to the page the code is on - e.g. games .php > games
$query = mysql_query("SELECT dacount FROM count1 WHERE page = '$pagename'"
;
list ($daviews) = mysql_fetch_row($query);
if (!$daviews) {
mysql_query("INSERT INTO count1 (NULL, '$pagename', '1' INTO count1)"
;
} else {
$views += 1;
$query = mysql_query("UPDATE count1 SET dacount VALUES('$views') WHERE page = '$pagename'"
;
}
?>
Thanx
Martin
thats the page for the thing im tryin to get to work
<?php
$con = mysql_connect("host","user","pass"

mysql_select_db("db",$con);
$pagename = "fred"; //change this to the page the code is on - e.g. games .php > games
$query = mysql_query("SELECT dacount FROM count1 WHERE page = '$pagename'"

list ($daviews) = mysql_fetch_row($query);
if (!$daviews) {
mysql_query("INSERT INTO count1 (NULL, '$pagename', '1' INTO count1)"

} else {
$views += 1;
$query = mysql_query("UPDATE count1 SET dacount VALUES('$views') WHERE page = '$pagename'"

}
?>
Thanx
Martin
thats the page for the thing im tryin to get to work