Jump to content

Include Php File When Click On Button


harshpandya

Recommended Posts

Add a $_GET variable to the URL to tell whether or not to do the include.
I am sorry but we are not reloading the page. we are trying to connect stream with it. so we need to include PHP file only when we click on small button. which should call the javascript function which uses that PHP file so we have to include that PHP file but we do not know howThanks,
Link to comment
Share on other sites

I am sorry but we are not reloading the page. we are trying to connect stream with it.
Javascript code cannot use PHP code. You can't open a file, or open a database connection, or a server connection, in PHP, and then use that connection in Javascript. PHP and Javascript are not related in that way.If you just want to run some PHP code by clicking a button, but not have Javascript use the PHP resources, then AJAX is the way to do that.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...