[FX.php List] Strange problem with editing records

Dale Bengston dbengston at preservationstudio.com
Fri Mar 7 10:50:13 MST 2008


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



More information about the FX.php_List mailing list