Error(Newbie)
| From: | webmaster at tececo dot com | Date: | Sat, 22 Jun 2002 14:19:27 +0000 |
| Subject: | Error(Newbie) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-103437@lists.php.net to get a copy of this message | ||
Both the below are in the same dir.
The meta.array_create.php file works fine elsewhere
when I try and view stat.php I get this error:
Parse error: parse error, expecting
T_STRING' or T_VARIABLE' or
`T_NUM_STRING' in C:\TecEco(Converting To PHP)\includes\stat.php on line 7
What does the error mean and how can I correct my code?
File meta.array_create.php
-----------------------------------
<?
$fn = explode("/", $_SERVER['PHP_SELF']);
$num_of_s = count($fn) - 1;
$fn = "$fn[$num_of_s]";
$query = "SELECT * FROM meta_data WHERE page_name = '$fn'";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
$row = mysql_fetch_array($result);
$id = $row['id'];
$pid = $row['pid'];
$title = $row['title'];
$description = $row['description'];
$keywords = $row['keywords'];
?>
file stat.php
-------------------------
<?
include "meta.array_create.php";
if(!isset($_COOKIE['tececo_stats']))
{
setcookie ("tececo_stats", 1);
}
$query = "INSERT INTO stats (vid, id, vn,
time, host, referrer, browser) VALUES
('', '$id', '$_COOKIE['tececo_stats']', '$time',
'$_SERVER['REMOTE_HOST']', '$_SERVER['HTTP_REFERER']',
'$_SERVER['HTTP_USER_AGENT']'); ";
$insert = mysql_query($query);
?>