[FX.php List] Beating a dead horse (was: trying to read back an
array)
Dale Bengston
dbengston at tds.net
Fri Sep 17 09:32:08 MDT 2010
This (and subsequent lines) should be:
$_SESSION[$recid]['description'] = $_POST['description'.$recid] ;
On Sep 17, 2010, at 9:59 AM, Bob Patin wrote:
> Well, I'm almost there, but here's what is happening:
>
> When I read back the array using this:
>
> foreach($_SESSION['recid'] as $recid => $value) {
> $status = "Open; pending manufacturer approval";
> $description = $value['description'];
> $problem = $value['problem'];
> $serial = $value['serial'];
>
> I get back 4 records, and my data isn't there (getting a single letter in each value)...
>
> Here's how I'm writing my vars:
>
> if( isset($_POST['recid']) && is_array($_POST['recid'])) {
> foreach($_POST['recid'] as $recid) {
> $_SESSION['recid']['description'] = $_POST['description'.$recid] ;
> $_SESSION['recid']['type'] = $_POST['type'.$recid] ;
> $_SESSION['recid']['serial'] = $_POST['serial'.$recid] ;
> $_SESSION['recid']['problem'] = $_POST['problem'.$recid] ;
> }
> }
>
> I should get back only ONE record, so the array should be empty other than that one; I closed my browser just to make sure I'd ended the previous session...
>
> Do I need to filter out empty data? Why am I not getting my vars back?
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list