php-general | 2003022
Date: 02/25/03
- Next message: John W. Holmes: "RE: [PHP] to paulm Re: [PHP] mysql trouble"
- Previous message: John W. Holmes: "RE: [PHP] mysql trouble"
- In reply to: CF High: "[PHP] $_POST arrays not evaluated in sql statement -- why?"
- Next in thread: CF High: "Re: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Reply: CF High: "Re: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>
('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: John W. Holmes: "RE: [PHP] to paulm Re: [PHP] mysql trouble"
- Previous message: John W. Holmes: "RE: [PHP] mysql trouble"
- In reply to: CF High: "[PHP] $_POST arrays not evaluated in sql statement -- why?"
- Next in thread: CF High: "Re: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Reply: CF High: "Re: [PHP] $_POST arrays not evaluated in sql statement -- why?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

