here is my code…some field remove to make it small.
Its good you did that, but all that code you posted still does not encapsulate the problem you are trying to solve - and your question is too ambiguous for me.
You have to do what we all end up doing.
You make a mini database table that only contains the bare minimum of data.
You make a mini script to query it.
You dont bother with logins, or alternative colored backgrounds in html.
Your html should not be aligned, or in tables, or have any JS at this stage.
You pare it down to the minimum, sql, PHP and html.
Then you experiment until either you sort the problem out, or you can post that minimum code on here along with here a) what you have and b) what you want to end up with.
I appreciate that you have already reduced it, but posting PHP/SQL code hidden away in reams of html just turns everyone off, and nobody will bother answering your question (even when you send them PMs ;)) it gives the impression you have put little or no effort into this yourself.
I am trying not to sound negative, but to honestly help you devise a winning strategy for tapping into the goodwill in the community to help you in your future programming life.
Reading the classic how to ask questions the smart way should give you a good heads up, because by going through the process of checking if you are asking a “smart question” often leads to you finding the solution.
Thanks for your suggestion, it would be helpful, if you would try to show the solution of my problem.
I am getting data from my order table in a html form, with its id under checkbox, now i want to select some id by checkbox & want to get the total quantity from the mysql table in a new html form/page. I hope, i am able to make u understand my problem now.