Delete record on click button
I have created a cart on myself using mysql.
Once added on cart i added a delete button.
That delete button deletes wrong data when 2-3 items are on cart.
I don't know where i m going wrong.
I have created a cart on myself using mysql.
Once added on cart i added a delete button.
That delete button deletes wrong data when 2-3 items are on cart.
I don't know where i m going wrong.
I'd have to debug it on the live site. Are you using eCart 6?
Nope here i m not using ecart at al.. i m using delete single record.. i created a button with name as "delete" & on clicking the record should get deleted on same page.
All of the rows in the cart are in the same form, so it won't know which row you clicked on. You can probably put the <form> tag around the <tr> so each row has its own form and it will start working properly.
alright. I gotta doubt, is it ok to have form within a form?
No you can't put a form within a form. If you need an outer form then you would want to use a url parameter for the delete and not submit a form.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.