-
-
Save anonymous/67f92c6d5f3ea1cde68a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require("../includes/config.php"); | |
$rows = query("SELECT * FROM Stock WHERE id = ?", $_SESSION["id"]); | |
foreach ($rows as $row) | |
{ | |
$positions[] = ["symbol" => $row["symbol"]]; | |
} | |
query("DELETE FROM Stock WHERE id = ? AND symbol = ?", $_SESSION["id"], $_POST["menu"]); | |
render("sell.php", ["positions" => $positions, "title" => "Sell"]); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id=sell> | |
<fieldset> | |
<form name="menu" action="sell.php" method="POST"> | |
<select> | |
<?php foreach ($positions as $position): ?> | |
<option value="<?= $position["symbol"]?>"><?= $position["symbol"] ?> </option> | |
<?php endforeach ?> | |
</select> | |
<button type="submit" class="btn btn-default">Sell</button> | |
</form> | |
</fieldset> | |
</div> | |
<div> | |
<a href="/">Home</a> | |
<div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment