RE: [PHP] probably stupid, but...
| From: | Jay Blanchard | Date: | Fri, 12 Nov 2004 20:28:28 +0000 |
| Subject: | RE: [PHP] probably stupid, but... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-201860@lists.php.net to get a copy of this message | ||
[snip]
$i=1;
while ($i<20)
{
if ($_POST[book_title_$i]' != "")
{
INSERT INTO
curriculum VALUES
('','$_POST[book_title_$i]','$_POST[book_level_$i]','$_POST[level_grades
_$i]','$_POST[book_section_$i]','$_POST[chapter_$i]','$_POST[chapter_tit
le_$i]','$_POST[lesson_title_$i]','$_POST[skill_$i]','$_POST[life_skill_
$i]','$_POST[success_indicator_$i]','$_POST[ncscos_$i]','$_POST[subject_
$i]','$_POST[pages_$i]','$_POST[c_kit_$i]');
$message .= "The entry $i was entered";
$i++;
}
else
{ $i++; }
}
But I get THIS error in the log:
[12-Nov-2004 14:59:19] PHP Parse error: parse error, unexpected
T_VARIABLE,
expecting ']' in /home/public/html/depts/fourh/curriculum_form_post.php
on line 19
[/snip]
Where is line 19? Is this it?
if ($_POST[book_title_$i]' != "")
If so, remove the apostrophe after the ]