In addition to what John suggested, I see you have switched from parens to
curly braces when you close your list of columns and list of values. AFAIK,
you need to use parens to contain those lists.

> -----Original Message-----
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2003 9:08 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions and MySQL?
> 
> 
> From: <[EMAIL PROTECTED]>
> 
> > And I'm trying to add a session variable to a MySQL database.
> > I've done this page that takes the results from a previous form...
> > But I get this error:
> > Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
> > `T_NUM_STRING' 
> >         On line 83
> > Which is the line that relates to the line:
> >                 \"$_SESSION['salutation'];\", 
> > 
> > I've tried removing the ';' but it change nothing...?
> > Can anyone see my error?
> > 
> > =================
> > <?
> > session_start();
> > header("Cache-control: private");
> > 
> >    $_SESSION['salutation'] = $_POST['salutation'];
> > 
> > //MySQL connection stuff
> >         mysql_query("INSERT INTO $table (
> >                 salutation,
> >                 name,
> >                 city
> >                 } VALUES {
> >                 \"$_SESSION['salutation'];\", 
> \"{$_SESSION['salutation']}\",
> >                 \"$_SESSION['name'];\", 
> \"{$_SESSION['name']}\",
> >                 \"$_SESSION['city'];\"
> \"{$_SESSION['city']\",
> >         }
> 
> ---John Holmes...
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to