Hot answers tagged

3 votes
Accepted

pset 7, quote: quote.php doesn't render second view

This program only ever executes the first two lines (require.. render..). Once you're in, you're out, back to quoteView1.php. Don't you need to call quoteView1.php conditionally? This program only ...
3 votes
Accepted

pset7 register.php and register_form.php how do they work with render() and extract()

1) Take a look at this line of code from register.php: render("register_form.php", ["title" => "Register"]);. This is in the public folder, and it is calling render() on a file that lives within ...
  • 1,412
1 vote
Accepted

Explain the syntax for function render in PSET 7

=> is the notation for a key-value pair in an associative array. Arrays that are indexed by key-value pairs like this (instead of indexed by integers, like arrays in C) are sometimes called "...
  • 3,046
1 vote
Accepted

Pset7 render() function and apology.php do I understand correctly?

You might be overthinking this. Look at login.php in the distro code. It calls apologize with a string literal ie apologize("Invalid username and/or password."); $message has the value that was ...
1 vote
Accepted

pset7 php generated html appearing above CS50 finance header

Ignore this, It was actually fixed very easily by switching the order of the render function and the array loop. Doh!

Only top scored, non community-wiki answers of a minimum length are eligible