-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.html
73 lines (64 loc) · 1.98 KB
/
profile.html
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
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="profilee.css">
</head>
<body>
<div class="container">
<div>
<div class="first">
<div></div>
<div></div>
<div></div>
</div>
<div class="sec">
<div><img src="kfc-logo-profile.jpg" alt=""></div>
<!-- your name section -->
<div id="customer"></div>
<a href="login.html"><p>Log Out</p></a>
</div>
<div class="thir">
<a href="order_history.html"><p>Order History</p></a>
<a href="payment.html"><p>Payment</p></a>
<a href="Account.html"><p>Account Settings</p></a>
</div>
</div>
<div class="box">
<div><h2>PAST ORDERS</h2></div>
<div>
<h3>NO PAST ORDERS AVAILABLE. LET'S START AN ORDER!</h3>
<a href="product_page.html"><button>Start Order</button></a>
<div><img src="https://www.kfc.com/_next/static/images/empty-bucket-835c4f452fae1420a288523f2c1ead2b.png" alt=""></div>
</div>
</div>
</div>
</body>
</html>
<script>
var details=JSON.parse(localStorage.getItem("registrationData"))
var name=details.name;
var st=""
for(var i=0;i<name.length;i++)
{
st+=name[i];
if(name[i]==" ")
break;
}
var cname=document.createElement("h1")
cname.innerText="Howdy! "+st;
document.querySelector("#customer").append(cname)
console.log(st)
var st1=name[0]
for(var i=0;i<name.length;i++)
{
if(name[i]==" ")
st1+=name[i+1]
}
console.log(st)
localStorage.setItem("customername",st1)
console.log(st1)
</script>