Posted by Vic Spainhower on 03/15/07 04:10
>> Maybe fix your javascript code? This isn't a PHP problem.
I know it's not a PHP problem and I don't know javascript or I would fix it.
I was hoping someone could offer a work-around as how to sort tables with
PHP on the fly.
Vic
"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:4dmdnQRT1JG5X2XYnZ2dnUVZ_ozinZ2d@comcast.com...
> Vic Spainhower wrote:
>> Hello,
>>
>> I have an HTML table that is being constructed from a MySQL table and
>> displays a form that includes a check box on 1 of the fields on the form
>> for each record. I have included in this PHP program a javascript routine
>> called sorttable.js which is something I found on the internet for
>> sorting tables and works quite well. The HTML table includes a check box
>> on each record so the user can select certain records for passing to the
>> next process. This works fine unless I sort the table on some column and
>> then the POST variables are lost. When I run the following code there are
>> no POST variables that will echo except the submit button.
>>
>> foreach ($_POST as $varName => $value){
>> echo ($varName . " = " . $value);
>> }
>>
>> However, if I don't sort the table the POST variables will be echoed for
>> every record in the table. I'm not sure why this is happening or how to
>> go about solving it. When I check certain records on the form and then
>> sort the table the checks themself don't disappear only the POST
>> variables do. This prevents me from looping thru the ARRAY to determine
>> the value of the POST check box for each record to see if it was checked.
>> If I run the above code but don't sort it I will have several hundred
>> POST variables (several for each record).
>>
>> Could someone give me an idea on how to solve this or offer some sort of
>> work-around??
>>
>> Thanks Very Much!
>>
>> Vic
>>
>>
>
> Maybe fix your javascript code? This isn't a PHP problem.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Navigation:
[Reply to this message]
|