Re: Re: Stuck in apostrophe hell
| From: | Simcha Younger | Date: | Wed, 04 Aug 2010 07:19:24 +0000 |
| Subject: | Re: Re: Stuck in apostrophe hell | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47291@lists.php.net to get a copy of this message | ||
> Paul_S_Johnson@mnb.uscourts.gov 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 <simcha@syounger.com>