-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectaddress.php
More file actions
24 lines (22 loc) · 859 Bytes
/
selectaddress.php
File metadata and controls
24 lines (22 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php //selectaddress.php
require_once "conn.php";
require_once "header.php";
if(isset($_SESSION["userID"]))
{
echo "<div id='cart_info'>";
echo "<h3>Select your billing address please.</h3>";
echo "<form method='post' action='checkout.php'>";
echo "<select id='addressID' name='addressID'>";
$sql = "SELECT addressID, houseNum, street, zip " .
"FROM rrtable_address " .
"WHERE userID =" . $_SESSION["userID"];
$result = mysql_query($sql,$conn) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<option value='" . $row["addressID"] . "'>" . $row["houseNum"] . " " . $row["street"] . " " . $row["zip"] . "</option>";
}
echo "</select><input type='submit' value='Submit'/></form></div>";
//echo 'Or enter it <a href="checkout.php">manually.</a>';
}
require_once "footer.php";
?>