I'm getting this error when I go into my Quote page on the website:

Fatal error: Invalid view: quote_form.php in /home/ubuntu/workspace/pset7/includes/helpers.php on line 155

Here's my quote_form.php (there are <> brackets where necessary, but when I type it here, it becomes invisible):

form action="quote.php" method="post"

    <div class="form-group">
        <input name = "symbol" placeholder = "symbol" type = "text"/>
    <div class= "form-group">
        <input type="submit">


And this is my quote:




    render("quote_form.php", ["title" => "Quote"]);


$stock = lookup($_POST["symbol"]);

    if ($stock == false)
        apologize("Stock isn't valid.");
        render("quote2.php", [$price = number_format($stock["price"], 2, '.', '')]);



Thanks for any help!

  • error message refers to /home/ubuntu/workspace/pset7/includes/helpers.php on line 155, maybe you inadvertently changed helpers.php?
    – ronga
    Commented Jul 21, 2016 at 13:50
  • Line 155 is this: trigger_error("Invalid view: {$view}", E_USER_ERROR); I think it means they're showing the error from helpers.php, not that there's an error in helpers.php, but I can't tell what's wrong...
    – little
    Commented Jul 22, 2016 at 4:04

1 Answer 1


You can see from helpers.php the conditions under which that particular error will be triggered:

if (file_exists("../views/{$view}"))
            // extract variables into local scope, tc.

        // else err
            trigger_error("Invalid view: {$view}", E_USER_ERROR);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .