php-general | 2003022
Date: 02/26/03
- Next message: Ezra Nugroho: "[PHP] query to Active Directory"
- Previous message: Joshua Moore-Oliva: "Re: [PHP] file upload and a browse for file box"
- In reply to: John W. Holmes: "RE: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey John et. al............
I tried your method John, and it works!
Re: excessive single quotes in the sql, but I tried stripping them out to no
effect. Using curly braces in the sql statement wasn't an option I knew
about. Thanks again for illuminating another bit of the PHP world.........
--Noah
"John W. Holmes" <holmes072000 <email protected>> wrote in message
news:001f01c2dd34$26719110$7c02a8c0 <email protected>
> >
> ('1','1','$date','$_POST['jersey_id'][$x]','$_POST['first'][$x]','$_POST
> ['
>
> Let's just be smart and think about this for a second. Look at all of
> the single quotes you've got. How do you expect PHP to be able to tell
> what's a variable and what's text? Do you mean $_POST or
> $_POST['jersey_id'] or $_POST['jersey_id'][$x] as the variable? PHP
> can't read your mind.
>
> Anyway, if you're going to use this method, put braces around your
> variable, so PHP knows what you are sending it.
>
> ('1','1','$date','{$_POST['jersey_id'][$x]}','{$_POST['first'][$x]}'
>
> or this method
>
> ('1','1','$date','$_POST[jersey_id][$x]','$_POST[first][$x]'
>
> PHP will be greedy, I think, and assume you mean $_POST[jersey_id][$x]
> as the variable.
>
> Or this method
>
> ('1','1','$date','".$_POST['jersey_id'][$x]."','".$_POST['first'][$x]."'
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Ezra Nugroho: "[PHP] query to Active Directory"
- Previous message: Joshua Moore-Oliva: "Re: [PHP] file upload and a browse for file box"
- In reply to: John W. Holmes: "RE: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

