I'm doing pset7, quote.php. I created the main logic in quote.php which is in public directory and (if lookup function sends an associative array) then sending the information to other quote.php which is in public directory.
The problem is when ever I submit any symbol it simply refreshes that page and prompt again for symbol.
I've tried every possible thing but these doesn't work. here is my code,
require("../includes/config.php");
render("quote_form.php", ["title" => "stock"]);
if ($_SERVER["REQUEST_METHOD"] == "POST"){
$stock = lookup($_POST["symbol"]);
if ($stock == false)
apologize("Sorry! symbol not found.");
//else
render("quote.php", ["stock" => $stock]);
}
else{
print("Quote");
}