[FX.php List] Simple submit and edit not working??

Denis Somar dsomar at gmail.com
Tue Mar 27 20:14:47 MDT 2012


Thanks malcolm, because I'm looping through found records and updating a
portal, it should be i=1

The primary error was not realizing that passing an input name with a space
such as "qty amended" becomes "qty_amended" in the _POST array.

Thanks,
Denis

On Tue, Mar 27, 2012 at 6:15 PM, Malcolm Fitzgerald <
malcolm at notyourhomework.net> wrote:

> Well I would say it is because $i = 1 and the first and only item in the
> array is zero [0]
>
>
> malcolm
>
>
> On 28/03/2012, at 8:30 AM, Denis Somar wrote:
>
> My head hurts... I have a simple submit for a record with -recid = 206
> submits but doesn't save even though the error returned is 0.
>
> I'm saving in a portal so my code is
>
> for ($i = 1; $i <= $_POST['FoundCount'];) {
>
> $portal_row = $_POST['recid'][$i];
>
> echo '<br>recid is ' . $_POST['recid'];
>  echo '<br>portalrow is ' . $portal_row;
> echo '<br>value is ' . $_POST["qty1 amended"][$i];
>  var_dump($_POST);
>
> ... then later
> $q->AddDBParam('Quotes to QUOTES_LINES::qty1 amended.' . $portal_row,
> $_POST["qty1 amended"][$portal_row]);
> }
>
> SOOOOoooooo, here's the screwy thing, I'm seeing everything I should
> EXCEPT the $portal_row echo.  The loop works, FoundCount is 1 (which it
> should be), and I'm passing recid through a hidden text field and able to
> retrieve
>
> The output is
> Foundcount is 1
> recid is 206
> portalrow is
> value is array(8) { ["amendquote"]=> string(12) "Save Changes" ["recid"]=>
> string(3) "206" ["qty1_amended"]=> array(1) { [206]=> string(1) "6" }
> ["qty2_amended"]=> array(1) { [206]=> string(1) "5" } ["qty3_amended"]=>
> array(1) { [206]=> string(1) "4" } ["qty4_amended"]=> array(1) { [206]=>
> string(1) "3" } ["FoundCount"]=> string(1) "1" ["quote"]=> string(2) "78" }
>
>
> Am I missing something here?  Any help is appreciated!
>
> Best,
> Denis
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120327/dd142cc5/attachment-0001.html


More information about the FX.php_List mailing list