Stuart Felenstein wrote:
I thought this one was under my control. Apparently
not.


I'm getting a "Warning: Invalid argument supplied for
foreach() in /home/mysite/public_html/mypage.php on
line 143

First, I have 3 form elements school[]
school[]
school[]


Here is how I initialize the session variable (after
user it's submit):


$_SESSION['schools'] = $_POST['school'];

print_r($_SESSION['schools']); here


Then finally on the transaction page, some pages down the road:


and also print_r($_SESSION['schools']); here

foreach($_SESSION['schools'] as $school)
{
$query = "INSERT INTO mytable (ProfileID, School)
VALUES ($LID, '$school')";
$res6 = run_query($query);
}

What have you find out?


I can't for the life of me find the issue here.

Any pointers / help would be greatly appreciated.

Stuart


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to