1
I’m developing customizable graphics by users where it can select the options they want, parameters to the php searching in the database sql and give me back what I want. For the charts I’m using highcharts. But I’m having trouble understanding how I return the vector of my function to js. I’m using jquery so I don’t need to refresh the page. But when I do
$.post('envia.php', {nome: nome}
It performs data search, but I do not know how to get this data back to my page where the graphics are generated. Someone would know the solution?
Want help with PHP or Javascript?
– Sergio
@Sergio Nos both, because I don’t know if it’s possible to return a vector to javascript and go through it normal. And some way to call the php file function by js.Obg
– Rodolfo Oliveira
For Javascript the bfavaretto already answered, because the
$.post
jQuery accepts a function to return what PHP sends. For PHP you have to put more code so we can help... you have something already in PHP?– Sergio
@Sergio didn’t, but it would be a select SELECT FROM products Where id=1; for example, it would return multiple records from there I wanted to go through the records to put on the chart
– Rodolfo Oliveira