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 trialLuca Mori
2,374 PointsThe function strpos is looking for the string "Content-Type", in my $_POST array? i don't get this.
From a test in the PHP section , i found this function : strpos( $array, 'Content-Type' ). As this is inside a foreach loop, and the array is the _POST, i tough it was looking for any instance of my array, to find any value containing that string, but i was wrong.
foreach( $_POST as $value ){
if( stripos($value,'Content-Type:') !== FALSE ){
echo "There was a problem with the information you have entered.";
exit();
}
}
Rifqi Fahmi
23,164 PointsFrom the code I look, maybe you type stripos not strpos ??? check your code again
Jason Anello
Courses Plus Student 94,610 PointsHi Luca,
Check this thread for posting code: https://teamtreehouse.com/forum/posting-code-to-the-forum
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsI found a few previous questions about this which might help you out.
https://teamtreehouse.com/community/form-validation-3
https://teamtreehouse.com/community/further-explanation-on-email-header-injection-exploit
Luca Mori
2,374 PointsLuca Mori
2,374 Pointscould someone tell me as well witch kind of tag i must use to display code in my questions? i tried the pre tag but is not working.