Skip to main content
1 of 2

pset7 Portfolio: Blank page

After completing portfolio, page loads a black page. I'm king of lost when needs to display in HTML/PHP/CSS code. xyz_form is understood. See portfolio (view) code below. CSS format took from Google.

<ul class="nav nav-pills">
<li><a href="quote.php">Quote</a></li>
<li><a href="buy.php">Buy</a></li>
<li><a href="sell.php">Sell</a></li>
</ul>

<p>
    Welcome back, <strong><?=$username?>!</strong> Your current deposit is <strong>$<?=number_format($cash, 2)?></strong>
</p>

<div class = "container">
    <table class = "table table-stripped">
        <thead>
            <tr>
                <th>Symbol</th>
                <th>Name</th>
                <th>Shares</th>
                <th>Price</th>
                <th>Total</th>
            </tr>
        </thead>
            <tbody>
                <?php 
                    
                    foreach ($positions as $position)
                    {
                        print("<tr>");
                        print("<td>{$position["symbol"]}</td>");
                        print("<td>{$position["name"]}</td>");
                        print("<td>{$position["shares"]}</td>");
                        print("<td>{$position["price"]}</td>");
                        print("<td>{$position["total"]}</td>");
                        print("</tr>");
                    }
                        
                ?>
            </tbody>
    </table>
</div>

table { margin-top: 20px; border: 1px solid gray; }

th { color: white; text-align: center; }

td { text-align: center; }

thead { /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#00b7cc+0,0057d1+100 */

background: #00b7cc; /* Old browsers */

background: -moz-linear-gradient(top, #00b7cc 0%, #0057d1 100%); /* FF3.6+ */

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #00b7cc), color-stop(100%, #0057d1)); /* Chrome,Safari4+ */

background: -webkit-linear-gradient(top, #00b7cc 0%, #0057d1 100%); /* Chrome10+,Safari5.1+ */

background: -o-linear-gradient(top, #00b7cc 0%, #0057d1 100%); /* Opera 11.10+ */

background: -ms-linear-gradient(top, #00b7cc 0%, #0057d1 100%); /* IE10+ */

background: linear-gradient(to bottom, #00b7cc 0%, #0057d1 100%); /* W3C */