hi,
I have a little problem, and I don't see a solution. I hope some of
you see a workable solution for my problem. Below I will explain what
I would like to do.
I got a variable number of rows in a table on my HTML page; those rows
are a direct output of my MySQL database. Very row as an ID number. I
would like to put a checkbox in front of every row in the HTML page,
and below some bottoms to functions like delete.
I am thinking of giving the checkboxes the id from the database as
their name. Once this form is submitted it goes to the page that needs
to process it. Here my problem starts. Putting in a query that is
something like: "DELETE FROM table WHERE id = $_POST["x"];" is not the
problem. But since it is possible to check more than one checkbox to
preform the function for several items simultaneously, I have no clue
about how to build the SQL query. Is there anyone, who has a clue how
to solve it.
Similar applications are used in many different webmail applications
(like Operamail and GMail). Just to delete all the selected mails in
once.
Looking forward to hear any suggestion.
Thank you!
Regards,
Jochem Donkers
I have a little problem, and I don't see a solution. I hope some of
you see a workable solution for my problem. Below I will explain what
I would like to do.
I got a variable number of rows in a table on my HTML page; those rows
are a direct output of my MySQL database. Very row as an ID number. I
would like to put a checkbox in front of every row in the HTML page,
and below some bottoms to functions like delete.
I am thinking of giving the checkboxes the id from the database as
their name. Once this form is submitted it goes to the page that needs
to process it. Here my problem starts. Putting in a query that is
something like: "DELETE FROM table WHERE id = $_POST["x"];" is not the
problem. But since it is possible to check more than one checkbox to
preform the function for several items simultaneously, I have no clue
about how to build the SQL query. Is there anyone, who has a clue how
to solve it.
Similar applications are used in many different webmail applications
(like Operamail and GMail). Just to delete all the selected mails in
once.
Looking forward to hear any suggestion.
Thank you!
Regards,
Jochem Donkers
Comment