To add an entry, click here.
To view past entries, click here.
To edit past entries, click here.

Investor Name
Stock Symbol
Shares Traded
Bought
Sold
Edit View
"; } } /*VIEW ENTRY BASED ON ID ***************************/ if ($_REQUEST['action'] == 4 && !empty($_REQUEST['id'])) { $theid = $_REQUEST['id']; $result = mysql_query("SELECT * FROM records WHERE id = '$theid'"); while($row = mysql_fetch_array($result)){ $bought = $row['price_bought']; $sold = $row['price_sold']; $gain_loss_perc = $sold / $bought; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Investor Name:" . $row['investor_name'] . "
Stock Symbol:" . $row['stock_symbol'] . "
Shares Traded:" . $row['num_shares'] . "
Bought:$" . $row['price_bought'] . "
Sold:$" . $row['price_sold'] . "
Gain/Loss %:%"; function round_up($value, $places=0){ if($places < 0){ $places = 0; } $mult = pow(10, $places); return ceil($value * $mult) / $mult; } echo round_up($gain_loss_perc, 2); echo "
"; } } ?>