3

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 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? ...


2

It should be: render("template", ["price" => $stock["price"]]); And if you want to pass the entire array then: render("template", ["any_variable" => $stock]);


1

Declaring an array variable in php may not be necessary but it won't hurt. If you look at the error message you're getting, you'll see the error is occurring on line 8 of quote.php. That's where you render the view quote.php (btw please rename your files, having the same name for different files, even if in different folders, is quite confusing). Your view/...


1

There is at least one more thing that you did not try :). This program will unconditionally go to quote_form.php. After it executes the require, it is rendering quote_form.php. It never reaches the if test. Let login.php be your guide.


1

Your usage of lookup is correct. Realize that lookup returns an array, so you want to be able to access they key value you want, whether name or price, from $stock (btw be sure it can handle "symbol" user input whether inputted in lower or upper caps). As for rendering the quote page, you can follow the way way login.php renders login_form.php as discussed ...


1

@user1298: Glad you fixed the typo. Now to determine why your JPEG image is not displaying, open a Terminal and execute the following command: ls -l ~/workspace/pset7/public/img/ You should see something like this: ~/workspace/ $ ls -l ~/workspace/pset7/public/img/ total 256 -rw-r--r-- 1 ubuntu ubuntu 243973 Oct 26 2015 logo.png -rw-r--r-- 1 ubuntu ...


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