Execute mysql Querys with jQuery/Ajax and PHP? -


I have PHP scripts that list all the applications from a Databse in an HTML table. In my line, I must accept two buttons and reject it to accept the acceptance of the ID to set the status to "accept". Due to the same it should update the status in the mysql database

At this time my script:

  echo  . $ Line-> ID '& lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Name '& lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Age '& Lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Mail '& lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> KD '& Lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Steam '& Lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Spiel '& Lt; / TD & gt; '; Echo '& lt; Td> . $ Line-> Status' & lt; / TD & gt; '; Echo & lt; / Tr & gt; '; } Echo '& lt; / Table & gt; ';   

I want to make my script dynamic, so I do not need to refresh the page after every change. Is it possible to do with jQuery or Ajax? If so, how do I do this?

  1. change & lt; Tr & gt; to by & lt; tr class = "clickable" data-id = "'. $ Row-> ID." & Gt; An event handler on

  2. tr.clickable

    $ ('tr.clickable') Attach. ('Click', function (element) {$ .get ('changestatus.php?' + $ (Element) .data ('id'))}}



Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -