Trying to get array of values into table.
Each value will be part of a new record, so it's a
loop.
I am getting a parse error though and for further down
in the code though I know this is what's causing it.
Is there anything wrong with this statement ?
if ( is_array( $_SESSION['l_industry'] )
Where would that go?
Stuart
--- Matt M. [EMAIL PROTECTED] wrote:
if ( is_array( $_SESSION['l_industry'] ) ) {
foreach ( $_SESSION['l_industry'] as $p )
{
$query = INSERT INTO Profiles_Industries
(ProfileID,
IndID)
VALUES ($LID, $p);
}
do you have a } for the if
if ( is_array( $_SESSION['l_industry'] ) ) {
foreach ( $_SESSION['l_industry'] as $p ) {
$query = INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES
($LID, $p);
} //foreach ( $_SESSION['l_industry'] as $p )
} //if ( is_array( $_SESSION['l_industry'] ) )
--
Yep, I had found it shortly before.
Only it's not looping. It is taking last value only.
Stuart
--- Matt M. [EMAIL PROTECTED] wrote:
if ( is_array( $_SESSION['l_industry'] ) ) {
foreach ( $_SESSION['l_industry'] as $p ) {
$query = INSERT INTO Profiles_Industries
where is your insert statement? I am guessing it is after your loop
if ( is_array( $_SESSION['l_industry'] ) ) {
foreach ( $_SESSION['l_industry'] as $p ) {
$query = INSERT INTO Profiles_Industries (ProfileID,IndID) VALUES
($LID, $p);
/This is where
Actually it did just loop. I need to test again.
The insert statement is the the one $query =
So it's after yes, but contained in the braces, like
you diagram below.
Stuart
--- Matt M. [EMAIL PROTECTED] wrote:
where is your insert statement? I am guessing it is
after your loop
if (
Hopefully these functions will explain it.
I'm starting the transaction, then provided it takes
with no errors it gets the commit
function begin()
{
mysql_query(BEGIN);
}
function commit()
{
mysql_query(COMMIT);
}
function rollback()
{
mysql_query(ROLLBACK);
}
begin();
$query = INSERT
Hi all.
I have this form in which one Administrator can insert new members and
after that, in another page, a form where he/she can insert the new
members sons daughters. I want to display a table with text inserts
into the admin can type lets say a maximum of 5 kids in the second
page.