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

So I am following the video and the after i press submit on the add person step I get the message 404 not found :

It says that the url was not found on this server then does not add ryan carson to the list

here is the code

<?php

$new_person = [ filter_input(INPUT_POST, 'first', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'last', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'website', FILTER_SANITIZE_URL), filter_input(INPUT_POST, 'twitter', FILTER_SANITIZE_STRING), filter_input(INPUT_POST, 'img', FILTER_SANITIZE_URL) ];

if (($fh = fopen('../data/csv/people.csv', 'a')) !==false) { fseek($fh, -1, SEEK_END); if (fgets($fh) != PHP_EOL) { fputs($fh), PHP_EOL); } fputcsv($fh,$new_person); fclose($fh); } header('location: /people.php');