[FX.php List] Strange problem with editing records
Chris Hansen
chris at iViking.org
Fri Mar 7 11:03:09 MST 2008
Bob,
Here's another take: is it certain that it's the FIRST edit that's
failing? How is the RecordID being passed to the next page?
Basically, all that a RecordID is (as most on this list probably
already know) is a sequential number starting at 1. So, if the user's
session expired, and they submitted, is it possible that the first
edit works, but the expired session results in a '1' being passed into
_subsequent_ edits as the RecordID (it sounds to me like there's a
whole chain of edits going on...)
Just a stab in the dark. HTH
--Chris Hansen
FileMaker 8 Certified Developer
FileMaker 7 Certified Developer
Creator of FX.php
"The best way from FileMaker to the Web."
www.iViking.org
On Mar 7, 2008, at 10:50 AM, Dale Bengston wrote:
> There must be some way the incorrect recID is getting supplied. A
> missing recID will fail to edit anything, rather than just decide to
> edit the first record.
>
> So for each form, the recID is brought back from the last POST and
> put in a hidden form field. Under those conditions, posting the next
> form should work. For debugging, can you print_r($_POST) on every
> page to see at what point the recID actually goes wrong?
>
> Dale
>
> On Mar 7, 2008, at 11:11 AM, Alex Gates wrote:
>
>> Bob -
>> So the rec id is gathered only on the first page and transferred
>> via hidden fields through all 8 pages?
>>
>> Is the rec ID of the first record in the DB 1?
>>
>> Finally -
>> Can't you just rewrite that part to use a session instead?
>>
>>
>> Bob Patin wrote:
>>> Joel,
>>> I agree that it looks weird, but the guy who wrote the original
>>> site (whose name you all know and who shall remain nameless) wrote
>>> it that way. He apparently stopped answering the client's calls,
>>> so she called me.
>>> At any rate, the whole web app seems to use that, and it does
>>> work... except for the weird bugs.
>>> BP
>>>> Hey Bob
>>>>
>>>>> $query->AddDBParam('-recid', $_POST['-recid']);
>>>>
>>>> $_POST['-recid'] seems weird to me. Is it kosher?
>>>>
>>>> So in the form, it's
>>>> <input type="hidden" name="-recid" value="<?php echo //way of
>>>> getting recid; ?>">
>>>> ?
>>>>
>>>> What happens if you give the hidden input a better name (without
>>>> the hyphen)?
>>>>
>>>> -Joel
>>>> _______________________________________________
>>>> 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
>> _______________________________________________
>> 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
>
More information about the FX.php_List
mailing list