This repository has been archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
formStore.php
executable file
·61 lines (53 loc) · 2.16 KB
/
formStore.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
<?php
session_start();
require_once('essentials/config.php');
if (!isset($_SESSION['email']) ) {
echo '<script>
location.href="error.php"
</script>';
}
if (isset($_POST['shipping_validation']) && $_POST['shipping_validation'] != '') { ?>
<h3>Contact Information</h3>
<div class="panel-body">
<form method="post" action="proceedStore.php" enctype="multipart/form-data">
<label for="lastName">Full Name<span>*</span></label>
<input type="text" name="name" class="form-control" id="lastName" placeholder="" value="<?php echo $_SESSION['name'] ?>" required>
<div class="invalid-feedback">
Valid last name is required.
</div>
<label for="lastName">Email<span>*</span></label>
<input type="email" name="email" class="form-control" id="lastName" placeholder="" value="<?php echo $_SESSION['email'] ?>" required>
<div class="invalid-feedback">
Valid last name is required.
</div>
<div class="row">
<div class="col-md-6 mb-3">
<label for="country">Phone<span>*</span></label>
<input type="text" name="phone" class="form-control" id="lastName" placeholder="" value="<?php echo $_SESSION['phone'] ?>" required>
<div class="invalid-feedback">
Valid last name is required.
</div>
</div>
<div class="col-md-6 mb-3">
<label for="state">Store<span>*</span></label>
<select name="store_id" class="custom-select d-block w-100" id="state" required>
<?php
$sql = "SELECT * FROM store WHERE status=1";
$run = mysqli_query($connect, $sql);
while ($row = mysqli_fetch_array($run)) {
$store_id = $row['store_id'];
$store_name = $row['store_name'];
echo "<option value='$store_id'>".$row['store_name']." , ".$row['address']."
,".$row['email'].",".$row['phone']."</option>";
}
?>
</select>
</div>
</div>
<br>
<input type="submit" name="submit" value="Proceed to Pay" class="btn btn-success">
<a href="" class="btn btn-outline-primary">Back</a>
</form>
</div>
<?php }
?>