In java I did a project that in several parts of the program called a function to go to the database to fetch a value and return, of type String nome = acessocliente.obtemnome(id);
, where in the accesclient class I had a parameter called getname that returned the name of the customer by id. Home
Well I wanted to do this in JavaScript and PHP. Home
That is somewhere in the JavaScript code calling the php of type var nome = "obtemnome.php?id="+id;
Home
How can I do this?