Timeline for pset7 Portfolio: Blank page
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 29, 2016 at 16:53 | vote | accept | cocobongo | ||
Apr 26, 2016 at 5:15 | comment | added | ronga | What you want to do is split what you have above into 2 separate files, the controller, which we'll call index.php, and the page to be viewed, which we'll call portfoliopage.php. Controller will query mysql for the stocks held, and hold the data in $positions array, assigning values to keys ("symbol", "shares", etc.) much like you already have above. You will then pass $positions to portfoliopage.php via render function. It is portfoliopage.php which will contain the html that the user will see. | |
Apr 25, 2016 at 14:05 | comment | added | cocobongo | "You do not query mysql in your code above" Where am I query mysql above? On the other hand, how can I connect "Portfoliopage.php" (view) to index.php (controller)? Watching shorts about MVC don't explain it. | |
Apr 25, 2016 at 5:46 | history | answered | ronga | CC BY-SA 3.0 |