From: Robert Sossomon [mailto:[EMAIL PROTECTED]
> OK, I took out the extra ' that I had at the beginning, and
> then I changed everything around to:
>
> if (!empty($_POST['book_title_'.$i]))
> {
> $addtocart = "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_title_'.$i],$_POST['lesson_title_'.$i],$
> _POST['skill_'.$i],$_POST['life_skill_'.$i],$_POST['success_in
> dicator_'.$i],$_POST['ncscos_'.$i],$_POST['subject_'.$i],$_POS
> T['pages_'.$i],$_POST['c_kit_'.$i])";
> echo "$addtocart";
> mysql_query($addtocart);
>
> And it still is producing an empty page (not even echoing out
> the $addtocart variable) when I run it.
If this is just a snippet and you do close that if clause with a curly
brace later in the code, my guess is that the parser doesn't like the
$_POST['book_title_'.$i] syntax.
Try changing them all like this, if you're looking to eliminate that
possibility:
$_POST["book_title_{$i}"]
Wish I had time to test my theory, but I'm strapped at the moment. :)
--
Mike Johnson Smarter Living, Inc.
Web Developer www.smarterliving.com
[EMAIL PROTECTED] (617) 886-5539
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php