开发者

using php and html to make a user grocery list

开发者 https://www.devze.com 2023-03-25 10:02 出处:网络
I can\'t seem to find a decent way to go about this part of the project. The user has in front of them a table that was drawn from a sql query using a for loop. Now, the user will want to click on ite

I can't seem to find a decent way to go about this part of the project. The user has in front of them a table that was drawn from a sql query using a for loop. Now, the user will want to click on items that they see. If they click the price, it edits the price. if they click the product name or description, it add it to their shopping list. When I use chec开发者_运维百科kboxes, it seems to me that the handler script needs to know what all the checkboxes are in advance. A cookie handler needs the same. I would hate to use javascript, but is it my only way?


Javascript wouldn't necessarily be your only way, but it will probably be a better and easier way. I have personal experience with jqGrid but there are tons of examples if you search for javascript editable grid.

With that being said, if you wanted to not use javascript, you could output your data as a form containing a table, with text boxes in each cell and allow the user to submit the changes back as a form post. I would think that using Javascript would be more palatable.

0

精彩评论

暂无评论...
验证码 换一张
取 消