Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalData.aspx.cs" Inherits="DataBaseProject.Pages2.PersonalData" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Personal Data Form</title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
- <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"/>
- <script src="../JS/PersonalData.js"></script>
- <style>
- body {
- background-image: url('Images/Magen_David.jpg');
- background-repeat: no-repeat;
- background-position: center top;
- background-attachment: fixed;
- background-size: 44%;
- margin-left: 50px;
- margin-bottom:20px;
- }
- .Blood_Type {
- padding: 10px;
- width: 400px;
- }
- .buttons3 {
- margin-left: 15px;
- border-radius: 15px 50px;
- }
- #BadBlood {
- font-family: 'Times New Roman';
- color: red;
- }
- #errCity {
- font-family: 'Times New Roman';
- color: red;
- }
- </style>
- </head>
- <body style="background-image:url(Images/Magen_David.jpg)">
- <div style="margin-left: -50px" class="w3-container w3-red"><h1>Personal Data Form</h1></div>
- <form runat="server" >
- <p class="City">
- Choose your city:
- <select <%--required--%> name="City" id="city" onchange="checkCity()">
- <option></option>
- <option style="width: 300px" class="w3-input w3-border w3-round-xxlarge" <%--required="true"--%> value="Nes Ziona">Nes Ziona</option>
- <option <%--required--%> value="Rehovot">Rehovot</option>
- <option <%--required--%> value="Gan Yavne">Gan Yavne</option>
- <option <%--required--%> value="Beit Hannan">Beit Hannan</option>
- <option <%--required--%> value="Kibutz Shiler">Kibutz Shiler</option>
- </select>
- </p>
- <div id="errCity">You must choose a city</div>
- <p>Please choose your blood type:</p>
- <p class="Blood_Type" <%--name="Blood_Type"--%> id="Blood_Type" onchange="checkBlood()">
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="A+" />A+
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="A-" />A-
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="B+" />B+
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="B-" />B-
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="AB+" />AB+
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="AB-" />AB-
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="O+" />O+
- <input style="width: 200px" class="w3-input w3-border w3-round-xxlarge" type="radio" <%--required--%> name="Blood Type" value="O-" />O-
- </p>
- <div id="BadBlood">You must choose your blood type</div>
- <br />
- <p class="Diseases" <%--name="Diseases"--%> id="Diseases">
- Please fill in any kind of chronic disease (for example - diabetes):
- <br /><br />
- <textarea style="width: 300px " class="w3-input w3-border w3-round-xxlarge" <%--required--%> id="Chronic_Diseases" name="Chronic_Diseases" placeholder="Diabetes, alergies/anaphylaxis,COPD,Asthma..."
- rows="10" cols="70" <%--id="Diseases"--%>> </textarea>
- </p>
- <input type="submit" value="Submit" name="submit2" id="Submit" class="buttons3"
- onclick="alert('Thanks for giving us youor medical data. We promise not to use it in order to harm you and hope we wont have to use it. Enjoy life!')"/>
- </form>
- <%
- Response.Write("bigbulbul1");
- Response.Write("name = " + Session["name"]);
- Response.Write("bday = " + Session["BDay"]);
- //Response.Write(ADOhelper.Insert("Ariel", "Lapidus", "0529565871", "wattoman7@gmail.com", "reeeee", "12-12-2002", "Pee", "Mee", "Ness Ziona", "B", ""));
- if (Request.Form["submit2"] != null)
- {
- string city = Request.Form["city"];
- string blood = Request.Form["Blood_Type"];
- string notes = Request.Form["Chronic_Diseases"];
- if (ADOhelper.IsNewUser((string)Session["phone_num"] /*, (string)Session["password"])*/))
- {
- //string insert = "";
- //insert += $"INSERT INTO tblSignedUsers VALUES('{name}', '{name2}', '{phone_num}', '{email}', '{password}', '{BDay}', '{father}', '{mother}', '{city}', '{blood}', '{notes}')";
- Response.Write("bigbulbul");
- Response.Write(ADOhelper.Insert((string)Session["name"], (string)Session["name2"], (string)Session["phone_num"], (string)Session["email"], (string)Session["password"], (string)Session["BDay"], (string)Session["father"], (string)Session["mother"], city, blood, notes));
- Response.Redirect("/Pages/Home.aspx");
- }
- else
- {
- Response.Write("This phone number is already registered in the system");
- }
- }
- %>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement