How to insert php code within javascript/html code?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Darrel
Forum Commoner
Posts: 33
Joined: Fri Oct 10, 2014 2:30 am

How to insert php code within javascript/html code?

Post by Darrel »

How to insert php code within javascript/html code?

I need to store small data so i want to use php to write data to text file..how insert the code within javascript.html code?My code need to be saved as .html or .php?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: How to insert php code within javascript/html code?

Post by Celauran »

Sounds like an AJAX request might be the way to go, but it's hard to say for certain without really knowing what you're trying to accomplish.
Post Reply