-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuy.php
62 lines (49 loc) · 1.27 KB
/
buy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?
// require common code
require_once("includes/common.php");
$symbol = strtoupper($_GET["symbol"]);
if ($symbol != "")
$s = lookup($symbol);
?>
<!DOCTYPE html>
<html>
<head>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<title>C$50 Finance: Buying</title>
</head>
<body>
<div id="top">
<a href="index.php"><img alt="C$50 Finance" src="images/logo.gif"></a>
</div>
<div id="middle">
<form action="buy2.php" method="post">
<table>
<tr>
<td>Symbol:</td>
<td><input name="symbol" type="text" value="<?= $symbol ?>"></td>
</tr>
<? if ($s): ?>
<tr>
<td>Description:</td>
<td><?= $s->name ?></td>
</tr>
<tr>
<td>Value:</td>
<td><?= printf("%.2f", $s->price); ?></td>
</tr>
<? endif ?>
<tr>
<td>Shares:</td>
<td><input name="shares" type="text" value="1"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Buy"></td>
</tr>
</table>
</form>
</div>
<div id="bottom">
or go back to the <a href="index.php">main</a> page
</div>
</body>
</html>