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

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -