-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiletisim.html
264 lines (213 loc) · 10.3 KB
/
iletisim.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!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">
<!-- boostrap linki -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<title>İLETİSİM SAYFASI </title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="hakkimda.html">Hasan Çakır </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="login.html">Giriş Yap</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="hakkimda.html">Hakkımda</a>
</li>
<li class="nav-item">
<a class="nav-link" href="ozgecmis.html">Özgeçmiş</a>
</li>
<li class="nav-item">
<a class="nav-link text-danger" href="iletisim.html">İletişim</a>
</li>
<li class="nav-item">
<a class="nav-link " href="ilgiAlanlarim.html">İlgi Alanlarım</a>
</li>
<li class="nav-item">
<a class="nav-link" href="sehrim.html">Şehrim</a>
</li>
<li class="nav-item">
<a class="nav-link" href="takimim.html">Takımım</a>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</nav>
<br>
<br>
<br>
<div class="container">
<form action="iletisim.php" method="POST">
<div class="row ">
<div class="form-group col-md-6">
<label for="name">Ad</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="name" placeholder="Ad" name="name">
</div>
<div class="form-group col-md-6 ">
<label for="surname">Soyad</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="surname" placeholder="Soyad" name="surname">
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="email">Email</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="email" placeholder="Email" name="email">
</div>
<div class="form-group col-md-6">
<label for="phone">Telefon No</label>
<input type="tel" class="form-control p-2 mt-2 mb-3" id="phone" placeholder="___ - ___ - __ - __ " name="phone">
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="inputAddress">Adres</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="adress" placeholder="Adres" name="adress">
</div>
<div class="form-group col-md-6">
<label for="inputAddress">Egitim Durumu</label>
<select name="education" id="education" class="d-flex p-2 mt-2 d-block w-100 mb-3">
<option>İlkokul</option>
<option>Ortaokul</option>
<option>Lise</option>
<option>Üniversite</option>
</select>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="Country">Ülke</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="country" placeholder="Ülke" name="country">
</div>
<div class="form-group col-md-4">
<label for="inputCity">Şehir</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="city" placeholder="Şehir" name="city">
</div>
<div class="form-group col-md-2">
<label for="district">İlçe</label>
<input type="text" class="form-control p-2 mt-2 mb-3" id="district" placeholder="İlçe" name="district">
</div>
</div>
<div class="form-group ">
<div class="title mb-2">Hobiler </div>
<div class="d-flex flex-wrap ">
<div class="form-check mb-3">
<input class="form-check-input d-block ml-3" type="checkbox" id="football" name="hobby[]" value="Futbol Oynamak">
<label class="form-check-label " for="football"> Futbol Oynamak
</label>
</div>
<div class="mx-3"></div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="Saz_Çalmak" name="hobby[]" value="Saz Çalmak">
<label class="form-check-label" for="Saz_Çalmak">
Saz Çalmak
</label>
</div>
<div class="mx-3"></div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="sky" name="hobby[]" value=" Kayak yapmak">
<label class="form-check-label" for="sky">
Kayak yapmak
</label>
</div>
<div class="mx-3"></div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="camp" name="hobby[]" value="Kamp Yapmak">
<label class="form-check-label" for="camp">
Kamp Yapmak
</label>
</div>
<div class="mx-3"></div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="Piano" name="hobby[]" value="Piano Çalmak">
<label class="form-check-label" for="Piano">
Piano Çalmak
</label>
</div>
<div class="mx-3"></div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="movie" name="hobby[]" value=" Film İzlemek">
<label class="form-check-label" for="movie">
Film İzlemek
</label>
</div>
</div>
</div>
<div class="form-group ">
<div class="title mb-2 mt-3">Cinsiyet</div>
<div class="d-flex ">
<div class="form-check ">
<input class="form-check-input" type="radio" name="gender" id="male" checked value="Erkek">
<label class="form-check-label" for="male">
Erkek
</label>
</div>
<div class="mx-3"></div>
<div class="form-check ">
<input class="form-check-input" name="gender" type="radio" value="Kadın" id="female">
<label class="form-check-label" for="female">
Kadın
</label>
</div>
</div>
</div>
<br>
<div class="form-group ">
<label for="message">Mesajınız </label>
<textarea id="message" class="form-control mt-3" cols="30" name="message" rows="10" placeholder="Mesajınız" style="resize: none;"></textarea>
</div>
<br>
<div class="form-group d-flex justify-content-end">
<div class="col-md-3"></div>
<button class="btn btn-danger " type="reset">Temizle</button>
<div class="mx-4"></div>
<button class="btn btn-success gönderButon" onclick="kontrol()" type="button">Gönder</button>
</div>
<br><br>
</form>
</div>
</body>
<script>
const validateEmail = (email) => {
return String(email)
.toLowerCase()
.match(
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
);
};
const kontrol = function() {
var button = document.querySelector(".gönderButon");
var name = document.getElementById("name").value;
var surname = document.getElementById("surname").value;
var phone = document.getElementById("phone").value;
var email = document.getElementById("email").value;
var adress = document.getElementById("adress").value;
var education = document.getElementById("education").value;
var country = document.getElementById("country").value;
var city = document.getElementById("city").value;
var district = document.getElementById("district").value;
var message = document.getElementById("message").value;
if (name.length == 0 || surname.length == 0 || phone.length == 0 || email.length == 0 || adress.length == 0 || education.length == 0 || country.length == 0 || city.length == 0 || district.length == 0 || message.length == 0) {
alert("Bütün Alanları Doldurmak Zorunludur.!");
} else {
if (!validateEmail(email)) {
alert("Geçerli bir email giriniz . ");
button.setAttribute('type', 'button')
} else {
button.setAttribute('type', 'submit')
}
}
}
</script>
</html>