Thread: MYSQL - insert
View Single Post
Old 09-15-2003, 11:48 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
while it may be good practice, php doesn't require you to isolate the variables like that .. ( except in certain instances like when your using objects )

also, when you are isolating variables, php uses '.' not '+'

so your query string would look like this:
PHP Code:
<?
$query 
"INSERT INTO userlog (browser, long_name, version, javascript, platform, os, ip, language) 
     VALUES ('" 
$browser "','" $longname "','" $version "','" $javascript "','" $platform "','" $os "','" $ip "','" $language "')";
?>
but jimmy's way will work fine too =)
__________________
Mike
sde is offline   Reply With Quote