Skip to main content
2 of 3
More explicit hint.
hotwebmatter
  • 3.1k
  • 2
  • 14
  • 30

You definitely don't need to do this:

redirect("/../views/quote_template.php");

... after you have used the render() function.

EDIT:

For quote.php, you should be doing something like this (in pseudo-code):

<?php

    // configuration

    // if user reached page via GET (as by clicking a link or via redirect)

        // else render form

    // else if user reached page via POST (as by submitting a form via POST)

        // validate submission
        // if symbol not in $_POST, apologize

        // Look up that stock
        
        // if symbol not found, apologize
        
        // else render quote
?>

You should look at the distribution code provided by CS50 Staff in the pset7.zip archive, and pay special attention to the parts that have comments like those in my pseudo-code above, especially the sections relating to // configuration, // if user reached page via GET, and // if user reached page via POST.

If this answers your question, be sure to click on the green checkmark to accept it. Or post an answer of your own and accept that -- I don't care, as long as you mark the question as answered to prevent it from becoming a zombie question!

hotwebmatter
  • 3.1k
  • 2
  • 14
  • 30