I have this small test page, below, which returns an error -

Parse error:  parse error in /usr/local/apache/htdocs/test.php on line 4

on the $browser line, if I comment it out, it returns an error on the $ip 
line, etc. I can leave all the php lines out, add an echo statement 

<? echo $HTTP_USER_AGENT ?>

in the body to get the http_user_agent and it displays the user agent just 
fine. What have I done wrong in such a simple bit of code?
-------------------------
<html><head><title></title></head>
<body>
<?
$browser�=�$HTTP_USER_AGENT;
$ip�=�$REMOTE_ADDR�;
$db�=�mysql_connect�(�"localhost"�,�"username"�,�"password"�);
mysql_select_db�(�"database"�,�$db�);
$sql��=��"INSERT�INTO�table_name(ip,browser,received)�
VALUES('$ip','$browser',now())"�;
$results��=��mysql_query�(�$sql);
?>
<h1>Howdy</h1>
</body></html>  
--------------------------------
TIA,
Chip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to