0

Is it possible to retrieve an external file (database) via link or form ( example.php) with ajax, then execute any php code within that file, which in turn displays it to the user?

Thanks, Bart

3
  • what is excellently you want ? Commented May 14, 2012 at 13:39
  • I think the answer is probably "Yes" Commented May 14, 2012 at 13:40
  • Can you please give some more information about this? What you need exactly? What do you mean external file via link? Whether it returns any data or have to manipulate? Commented May 14, 2012 at 13:41

1 Answer 1

1

If you're asking to use ajax to retrieve the php file and execute it after retrieving it, I think the answer is "no". The ajax is client side, and the php is server side. You CAN however call the php file FROM the jquery using .GET or .POST, process it with the data supplied, and return the results TO the ajax function to display it however you'd like. There are thousands of simple examples if you google it.

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

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.