userInfo update system is done
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12" id="shopping_cart">
|
||||
<form action="userInfo.php" method="get">
|
||||
<form action="cart.php" method="get">
|
||||
<table class="cartTable">
|
||||
<thead>
|
||||
<!-- <tr style="margin:auto; border: 2px solid black;">
|
||||
|
||||
+15
-8
@@ -2,8 +2,11 @@
|
||||
<html lang="en">
|
||||
<?php
|
||||
require_once '../php/connection.php';
|
||||
require_once '../php/functions.php';
|
||||
$conn = connectMysql();
|
||||
require_once '../php/logged_in_header.php';
|
||||
$resultData = query_getUserInfo($conn, $_SESSION['username']);
|
||||
$row = $resultData->fetch_assoc();
|
||||
?>
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
@@ -41,34 +44,34 @@
|
||||
<form class="row g-3" action="../php/saveUserInfo.php" method="post">
|
||||
<div class="col-md-6">
|
||||
<label for="inputEmail4" class="form-label">Email</label>
|
||||
<input type="email" class="form-control" name="email" id="inputEmail">
|
||||
<input type="email" class="form-control" name="email" id="inputEmail" value="<?php echo $row["C_EMAIL"]?>">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="inputPhone4" class="form-label">Phone</label>
|
||||
<input type="tel" class="form-control" name="phone" id="inputPhone" placeholder="123-456-7890" maxlength="12">
|
||||
<input type="tel" class="form-control" name="phone" id="inputPhone" placeholder="123-456-7890" maxlength="12" value="<?php echo $row["C_PHONE"]?>">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="inputAddress" class="form-label">Address</label>
|
||||
<input type="text" class="form-control" name="address" id="inputAddress" placeholder="1234 Main St">
|
||||
<input type="text" class="form-control" name="address" id="inputAddress" placeholder="1234 Main St" value="<?php echo $row["C_ADDRESS"]?>">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label for="inputAddress2" class="form-label"></label>
|
||||
<input type="text" class="form-control" name="unit" id="inputAddress2" placeholder="Apartment, studio, or floor">
|
||||
<input type="text" class="form-control" name="unit" id="inputAddress2" placeholder="Apartment, studio, or floor" value="<?php echo $row["C_UNIT"]?>">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="inputCity" class="form-label">City</label>
|
||||
<input type="text" class="form-control" name="city" id="inputCity">
|
||||
<input type="text" class="form-control" name="city" id="inputCity" value="<?php echo $row["C_CITY"]?>">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="inputState" class="form-label">State</label>
|
||||
<select id="inputState" class="form-select" name="country">
|
||||
<option selected>Choose...</option>
|
||||
<option>...</option>
|
||||
<option <?php if ($row["C_COUNTRY"] === '') echo 'selected'; ?> >Choose...</option>
|
||||
<option <?php if ($row["C_COUNTRY"] === 'Canada') echo 'selected'; ?> >Canada</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label for="inputZip" class="form-label">Zip</label>
|
||||
<input type="text" class="form-control" name="zip" id="inputZip">
|
||||
<input type="text" class="form-control" name="zip" id="inputZip" value="<?php echo $row["C_ZIP"]?>">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check">
|
||||
@@ -84,6 +87,10 @@
|
||||
if($_GET['error'] === "notChecked") {
|
||||
echo '<div class="errorFont">Please check the box!</div>';
|
||||
}
|
||||
|
||||
if($_GET['error'] === '0') {
|
||||
echo '<div class="successFont">Updated Successfully!</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user