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 PHP User Authentication Building the Library HTTP Foundation

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

The parameter here is "location:", isn't it?

I've been struggling with this one for a little while. Is it possible the question is worded slightly wrongly?

This is the code the question is asking for...

<?php 
$response = \Symfony\Component\HttpFoundation\Response::create(null, \Symfony\Component\HttpFoundation\Response::HTTP_FOUND, ['_______' => '/index.php']);
?>

And I've marked out the blank we need to fill in. I think we need to add the location flag in there. However in my version of the code, following the video we've done this in addBook.php

<?php
$response = \Symfony\Component\HttpFoundation\Response::create(null, \Symfony\Component\HttpFoundation\Response::HTTP_FOUND,  header("Location:/books.php"));   
?>

See the difference? What do we need to put in the blank? :)

1 Answer

Rachel Nemati
Rachel Nemati
98 Points

I think Location is correct, remember the capital L!