0

i'm a beginner to php. i need to use php function which process some other pages and to display

dynamic result as javascript when a HTML button click is triggered .Is it possible?...

2 Answers 2

3

Yes. This is possible through a collection of technologies known as AJAX, i.e. using Javascript's asynchronous communication ability.

There are already a number of pre-built libraries that allow you to do this with ease. One of the most common is Prototype, also just google AJAX and you will find hundereds of libraries, tutorials and guides to help you.

Sign up to request clarification or add additional context in comments.

Comments

0

Jamie Lewis's answer is a good one, but I will say that he is addressing to JavaScript while answering. I think the pure PHP solution is following:

You create a PHP file (myFile.php) where you get some arguments with GET method. And Your HTML form should have a button that calls following:

myFile.php?agrument1=10&argument2=20

SO HTML will pass arguments to your PHP file and you should get that arguments and call a function with that arguments.

For more details see (sending arguments with GET/POST methods ).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.