Skip to content

Instantly share code, notes, and snippets.

/quote.php Secret

Created August 27, 2016 00:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/59c2a5d32787c4ed45ea9f2ff3e716cf to your computer and use it in GitHub Desktop.
quote.php - shared from CS50 IDE
<?php
// configuration
require("../includes/config.php");
render("../views/quote_form.php");
if (lookup($symbol) != false)
{
render("../views/quote_template.php", ["price" => lookup($symbol)["price"]]);
redirect("/../views/quote_template.php");
}
else
{
apologize("Invalid stock.");
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment