Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

is there is any way to get response from php file to html file ?

Hey i am working on my personal website which is index.html and i also have contact form there and i also created mail.php for mail processing but how should i get response from mail.php and display message on index.html...

Thanks

Roy G
Roy G
7,955 Points

Why don't you just change the index.html to index.php?

I also thought about same solution but i want to know is there is any way to do that or not

1 Answer

Roy G
Roy G
7,955 Points

As far as I know PHP code cannot be run in an html file. You will have to change the file to index.php (which isn't that much of a change tbh).