Hi,
Is it possible to do the following for example could I change the array below from method one to method two.
Method One
$address_book = array
(
array(first_name => "John", last_name => "Davis", phone_number => "0876006529"),
array(first_name => "Graham", last_name => "Okeeffe", phone_number => "0875656565"),
array(first_name => "James", last_name => "Doyle", phone_number => "0876008962"),
array(first_name => "Mary", last_name => "O'Brien", phone_number => "0856006529"),
);
Method Two
$address_book = array
(
array(first_name => $_SESSION[first_name], last_name => $_SESSION[last_name], phone_number => $_SESSION[phone_number],),
);
What I want to do is pass variable from a web form to another page as SESSIONS
And then incorporate in the same array as I want to store different details before I submit to a database.
Is it possible to do the following for example could I change the array below from method one to method two.
Method One
$address_book = array
(
array(first_name => "John", last_name => "Davis", phone_number => "0876006529"),
array(first_name => "Graham", last_name => "Okeeffe", phone_number => "0875656565"),
array(first_name => "James", last_name => "Doyle", phone_number => "0876008962"),
array(first_name => "Mary", last_name => "O'Brien", phone_number => "0856006529"),
);
Method Two
$address_book = array
(
array(first_name => $_SESSION[first_name], last_name => $_SESSION[last_name], phone_number => $_SESSION[phone_number],),
);
What I want to do is pass variable from a web form to another page as SESSIONS
And then incorporate in the same array as I want to store different details before I submit to a database.