forked from OvillageCI/osang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
208 lines (167 loc) · 6.79 KB
/
index.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
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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>100% pour sang · Twitter Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Tidi Traore" >
<!-- CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<style type="text/css">
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
.container {
width: auto;
max-width: 680px;
}
.container .credit {
margin: 20px 0;
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="../assets/js/html5shiv.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="../assets/ico/favicon.png">
</head>
<body>
<!-- Part 1: Wrap all page content here -->
<div id="wrap">
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>Sang pour sang donateur</h1>
<?php
if(isset($_POST["valider"]) && ($_POST["valider"])=="valider") {
//connection base de données
mysql_connect($server = "localhost", $username = "root", $password = "tidiane") or die("connexion serveur impossible");
mysql_select_db("osang") or die("connexion bd impossible");
$grpsang=$_POST["groupesanguin"];
$nom=$_POST["nom"];
$prenom=$_POST["prenom"];
$mail=$_POST["mail"];
$contact=$_POST["contact"];
$localisation=$_POST["localisation"];
$plusinfo=$_POST["plus_info"];
if(!empty($grpsang) && !empty($nom) && !empty($prenom) && !empty($mail) && !empty($contact) && !empty($localisation) ) {
//requête d'insertion de données dans la bd
$sql="insert into donnateur values('$mail','$nom','$prenom','$contact','$localisation','$plusinfo','$grpsang')";
mysql_query($sql);?>
<div class="alert alert-success"> <a href="#" class="close" data-dismiss="alert"> × </a> Merci pour votre enregistrement, votre action pourra sauver des vies </div>
<?php
}
}
?>
</div>
<form action="index.php" method="post">
<fieldset>
<legend>Merci de nous faire part de votre groupe sanguin.</legend>
<label>Groupe sanguin</label>
<select id="groupesanguin" name="groupesanguin">
<option value="a+">
A+
</option>
<option value="a-">
A-
</option>
<option value="b+">
B+
</option>
<option value="b-">
B-
</option>
<option value="ab+">
AB+
</option>
<option value="ab-">
AB-
</option>
<option value="o+">
O+
</option>
<option value="o-">
O-
</option>
</select>
<label>Nom</label>
<input type="text" placeholder="Entrer votre Nom" id="nom" name="nom">
<label>Prenom</label>
<input type="text" placeholder="Entrer votre prenom" id="prenom" name="prenom">
<label>Mail</label>
<input type="email" placeholder="Entrer votre mail" id="mail" name="mail">
<label>Contact</label>
<input type="text" placeholder="Entrer votre contact" id="contact" name="contact">
<label>Localisation</label>
<input type="text" placeholder="Entrer votre ville ou commune" id="localisation" name="localisation">
<label>Plus d'information sur la localisation</label>
<input type="textarea" placeholder="Entrer les informations de votre ville ou commune" id="plus_info" name="plus_info">
<br/>
<button type="submit" class="btn" name="valider" value="valider">Valider</button>
</fieldset>
</form>
</div>
<div id="push"></div>
</div>
<div id="footer">
<div class="container">
<p class="muted credit"> <a href="http://www.ovillage.ci" target="_blank">Initiative Ovillage</a> .</p>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../assets/js/jquery.js"></script>
<script src="../assets/js/bootstrap-transition.js"></script>
<script src="../assets/js/bootstrap-alert.js"></script>
<script src="../assets/js/bootstrap-modal.js"></script>
<script src="../assets/js/bootstrap-dropdown.js"></script>
<script src="../assets/js/bootstrap-scrollspy.js"></script>
<script src="../assets/js/bootstrap-tab.js"></script>
<script src="../assets/js/bootstrap-tooltip.js"></script>
<script src="../assets/js/bootstrap-popover.js"></script>
<script src="../assets/js/bootstrap-button.js"></script>
<script src="../assets/js/bootstrap-collapse.js"></script>
<script src="../assets/js/bootstrap-carousel.js"></script>
<script src="../assets/js/bootstrap-typeahead.js"></script>
</body>
</html>