Hi,

How to call php function in javascript?????

you can't call php function directly from java script, instead use ajax to call a file say abc.php which will call specific function.

You could only do this via an ajax call to another page that would run the function.

The Jquery javascript library provides a simple way to make ajax calls.

Javascript is a client side language whereas php is server side. All the php stuff is processed before your client side stuff.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.