Re: [PHP-DB] Re: Stuck in apostrophe hell

[email protected] (Simcha Younger)
Newsgroups php.db
Message-ID <[email protected]>
> [email protected] wrote:

> > 
> > THE INPUT:
> > 
> > $sql_insert_registration = sprintf("INSERT INTO
> >   Registrations (
> >     Class_ID,
> >     prid,
> >     Registrant,
> >     Company,
> >     Phone,
> >     Email
> >   )
> > VALUES (
> >     $_POST[Class_ID],
> >     $_POST[prid],
> >     '%s',".

You need double-quotes here, 
 \"%s\",

> >     parseNull($_POST['Company']).",
> >     '$_POST[Phone]',
> >     '$_POST[Email]'
> > )", mysql_real_escape_string($_POST['Registrant']));
> > 


-- 
Simcha Younger <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.