Jump to content

How to call a php file using Javascript.


mani_

Recommended Posts

mani_,Kinda difficult to say without knowing your context, but here's what I think you mean.test.php

<?phpecho "alert('".$_GET['user']."');";?>

jsTest.html

<html><head>  <title>PHP Caller</title><script type="text/javascript" src="test.php?user=mani_"></script></head><body>This is a test....</body></html>

Let me know if I'm not getting your meaning.Thanks,

Link to comment
Share on other sites

yes thats works and the same thing i was meaning.I have a index.htm page as a home page and another php file.. i dont want to change the index.htm to index.php... thats why i was asking to put some output from php file in htm file..thanks anyways :)

Link to comment
Share on other sites

Hi,I have moved this topic to Java Script as you are asking for some java script. This way more people will be able to help as people who are helping out with java script are in the java script forum. :) alzable

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...