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 trialJackson Monk
4,527 PointsPhp file does not at all work
I am working in Notepad++ trying to send the text content of an element from one web page to another with php, but php does not at all seem to work. When I set the form's action attribute to the php page, it just displays all the code I have written on the page rather than working. Even when I use
<?php include 'Phpfile.php' ?>
in the page I want to send the information to, it still does not do anything. I'm pretty new to php so if anyone could tell me what I'm doing wrong, I would be very appreciative.
2 Answers
Mikkel Rasmussen
31,772 PointsCan you post us some code? :)
Jackson Monk
4,527 PointsNvm, didn't realize I had to install a web server cause php is a server side language
Jackson Monk
4,527 PointsJackson Monk
4,527 PointsSure Mikkel, here is the element on the first page I'm trying to send:
<textarea type = text id = rant-input name = rant></textarea>
Here is the element on another page that I want to recieve the information:
Here is the php file, called Processor1.php, again very new to php so I could have made a thousand mistakes:
Thanks for any help
Jackson Monk
4,527 PointsJackson Monk
4,527 PointsWhy does the php just show up as the code I wrote rather than html?