> 1-I guess I need a way to make sure in the foreach
> that when the first empty element is reached the loop
> dies.
Just to be sure you understand:
You should really not die when you hit a blank.
You should just SKIP it and process the rest.
A user *might* choose to fill in the first and third
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 December 2004 10:26, Stuart Felenstein wrote:
> I have arrays set up in a user form. One type is from
> a multi-select list.
[]
> I have 3 textfield elements all named
> Yes, I did that and it works correctly now. I was
> tryin g to better understand why the difference in the
> behaviour.
>
> Stuart
The first array is created by selecting individual elements from a
muli-select list
(My multi-select is a little hazy, but I think it's something like...)
One (S
--- Mike Smith <[EMAIL PROTECTED]> wrote:
> How about:
>
>
> if ( is_array($_SESSION['schools'] ) ) {
> foreach($_SESSION['schools'] as $h) {
> If($h!=""){ //First added line
> $query = "INSERT INTO Prof_Schools (ProfID, School)
> VALUES ('$LID', '$h')";
> $res6 = run_query($query);
> echo $quer
How about:
if ( is_array($_SESSION['schools'] ) ) {
foreach($_SESSION['schools'] as $h) {
If($h!=""){ //First added line
$query = "INSERT INTO Prof_Schools (ProfID, School)
VALUES ('$LID', '$h')";
$res6 = run_query($query);
echo $query;
} //End added line
}
}
--
PHP General Mailing List
I have arrays set up in a user form. One type is from
a multi-select list. (I'm passing these through a
multi page form as session variables)
The multi select list array code is like this:
To $_POST (going on to next page)I have this:
$_SESSION['industry'] = $_POST['L_Industry'];
Then in the f
6 matches
Mail list logo