Jump to content

How to call a php file using Javascript.

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']."');";?>


<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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...