What I want to do is that when entering the page, a table with the information of the users is loaded, but using JS, I do not like to put PHP code in the HTML, the question is that I do not know how to apply it through ajax, Data will be sent, which would be: $.post("Datos.php", datos_a_enviar, exito)
, in which data is the PHP page, data_a_send_ the variables, and I succeed the function that is executed when the post succeeds.
What I do not know is how to load the data with ajax once the page is loaded, I saw that using window.onload will execute a function to load the page, but what I want to know is how I get them through ajax to display them in the vista ?, try $.post("Tomardatos.php, exito)
, in which to take data is where I execute the sql and I succeed the function that is executed to show it, it was obvious that it was not going to work, but I try to curose it, I do not know if they understand me what I want to do xD, I hope you can answer me:)