how to delete multiple records from database using checkbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshrasm
    Contributor
    • Nov 2007
    • 254

    how to delete multiple records from database using checkbox

    hello everyone

    I want to delete the selected records from database using checkbox. whch is generated dyanamically and checkbox is also generated dynamically,usi ng php.

    so please help me. if you may give some code, it will be better for me

    thanks..
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You won't be able to do this with JavaScript, but do you want the deletion to happen without unloading the page? If so, you could use Ajax for this.

    Comment

    • mukeshrasm
      Contributor
      • Nov 2007
      • 254

      #3
      Originally posted by acoder
      You won't be able to do this with JavaScript, but do you want the deletion to happen without unloading the page? If so, you could use Ajax for this.
      Hi I don't want that deletion should happen without unloading. means it can be reloaded after deleting the record.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Then in that case, there's no need for JavaScript. This would be a PHP problem.

        Is there anything that you require on the client-side?

        Comment

        • mukeshrasm
          Contributor
          • Nov 2007
          • 254

          #5
          Originally posted by acoder
          Then in that case, there's no need for JavaScript. This would be a PHP problem.

          Is there anything that you require on the client-side?
          No. I just want that when user selects checkboxed it should delete the selected records from database. similarly when we do it while deleting our mail in yahoo.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by mukeshrasm
            No. I just want that when user selects checkboxed it should delete the selected records from database. similarly when we do it while deleting our mail in yahoo.
            Yahoo Mail uses Ajax. If you need to avoid unloading the page (which you've already said is not necessarily a requirement), then you will require some JavaScript, otherwise it's PHP which will connect to the database and delete the selected records.

            Comment

            • mukeshrasm
              Contributor
              • Nov 2007
              • 254

              #7
              Originally posted by acoder
              Yahoo Mail uses Ajax. If you need to avoid unloading the page (which you've already said is not necessarily a requirement), then you will require some JavaScript, otherwise it's PHP which will connect to the database and delete the selected records.
              Hi

              If you can give code for that than it would be better for me. So, Please!

              Thanks

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                This is a PHP problem, so I would advise you to ask in the PHP forum, if you haven't already done so.

                Comment

                Working...