<!doctype html>
<html lang="en">
  <head>
  	<title>Contact Form 10</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

	<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,700' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
	<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
	 <link rel="stylesheet" href="./style_signature.css">


	<link rel="stylesheet" href="style_new.css">

	</head>
	<script>
function validateForm() {
    var radioChecked = false;
    var checkboxChecked = false;

    // Check if at least one radio button is checked
    var radioButtons = document.getElementsByName("how_to_consult");
    for (var i = 0; i < radioButtons.length; i++) {
        if (radioButtons[i].checked) {
            radioChecked = true;
            break;
        }
    }

    // Check if at least one checkbox is checked
    var checkboxes = document.getElementsByName("health_issue[]");
    for (var i = 0; i < checkboxes.length; i++) {
        if (checkboxes[i].checked) {
            checkboxChecked = true;
            break;
        }
    }

    // Display error messages if necessary
    if (!radioChecked) {
        alert("Please select at least one radio option. You want to Consult Dr. Ashish*");
        return false;
    }

    if (!checkboxChecked) {
        alert("Please select at least one checkbox option. Kanakaveda's Referance You Got From");
        return false;
    }

    return true; // Form is valid
}
</script>


	<body>
	<section class="ftco-section img bg-hero" style="background-image: url(bg1b.jpg);">
	
	 
		<div class="container">
		
		<div class="row justify-content-center">
				<div class="col-md-6 text-center mb-5">
					<img src="Kanakaveda.png" alt="logo">
				</div>
			</div>
			
			<div class="row justify-content-center">
				<div class="col-lg-11">
		
					<div class="wrapper">
						<div class="row no-gutters justify-content-between">
							
							<div class="col-lg-11">
							
							
								<div class="contact-wrap w-100 p-md-5 p-4"> 
									<h3><strong>Book An Appointment For Dr. Ashish Gaikwad</strong><span style="font-size:14px;"><br>www.kanakavedaayurveda.com</span></h3>
									
									<div id="form-message-warning" class="mb-4"></div> 
				      		
									  <form method="post" action="insert_registration.php" enctype="multipart/form-data" onSubmit="return validateForm()">
									  <input type="hidden" name="event_name" value="<?php echo $_REQUEST['event_name']?>">
								   <input type="hidden" name="eventID" value="<?php echo $_REQUEST['eventID']?>">
								
										<div class="row">
											<div class="col-md-12">
												<div class="form-group">
													<input type="text" class="form-control" name="first_name" placeholder="First Name" required>
												</div>
											</div>
											<div class="col-md-12"> 
												<div class="form-group">
													<input type="text" class="form-control" name="last_name"  placeholder="Last Name" required>
												</div>
											</div>
											</div>
											
											<div class="row">
											
											<div class="col-md-12"> 
												<div class="form-group">
													<input type="text" class="form-control" name="mobile_no"  placeholder="Mobile No" required pattern="[0-9]{10}">
												</div>
											</div>
											
											<div class="col-md-12">
												<div class="form-group">
													<input type="text" class="form-control" name="city" placeholder="City" required>
												</div>
											</div>
											
											<div class="col-md-12">
												<div class="form-group">
													<input type="number" class="form-control" name="age" placeholder="Age" required>
												</div>
											</div>
											
											</div>
											
											<label style="color:#000000"><strong>Your Health Issues*</strong></label><hr>
											<div class="row">
											
										
											
											<div class="col-md-12">
												<div class="form-group" >
												
				<input type="checkbox" name="health_issue[]" id="checkbox1" value="KNEE PAIN">
				<label for="checkbox1" style="color:#000000">KNEE PAIN</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox2" value="NECK PAIN">
				<label for="checkbox2" style="color:#000000">NECK PAIN</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox3" value="JOINT PAIN">
				<label for="checkbox3" style="color:#000000">JOINT PAIN</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox4" value="BACK PAIN">
				<label for="checkbox4" style="color:#000000">BACK PAIN</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox1" value="SCIATICA">
				<label for="checkbox1" style="color:#000000">SCIATICA</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox2" value="OBESITY">
				<label for="checkbox2" style="color:#000000">OBESITY</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox3" value="HYPOTHYRODIZM">
				<label for="checkbox3" style="color:#000000">HYPOTHYRODIZM</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox4" value="PCOD">
				<label for="checkbox4" style="color:#000000">PCOD</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox4" value="SKIN">
				<label for="checkbox4" style="color:#000000">SKIN</label><br>
				<input type="checkbox" name="health_issue[]" id="checkbox4" value="DIABETES">
				<label for="checkbox4" style="color:#000000">DIABETES</label>
												</div></div>
											
											</div>
											
											
										
												<label style="color:#000000"><strong>If you have any specific question you can ask here </strong></label><hr>
											<div class="row">
											
										
											
											<div class="col-md-12">
												<div class="form-group" >
												
												<textarea name="specific_question" class="form-control" placeholder="Specific Question"></textarea>
												
												
												</div></div>
											
											</div>
											
											
											<label style="color:#000000"><strong>You want to Consult Dr. Ashish*</strong></label><hr>
											
											
											
										
											
											
											
											
											
											
											
  
 
</section>
<!-- partial -->


  <script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script><script  src="./script.js"></script>

<!-- partial -->

				   <script>
        function saveSignature() {
            var canvas = document.getElementById('signature-pad');
            var dataURL = canvas.toDataURL(); // Get the image data

            // Send the image data to the PHP script
            var xhr = new XMLHttpRequest();
            xhr.open('POST', 'save_signature.php?name=123456', true);
            xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
            xhr.onload = function() {
                if (xhr.status === 200) {
                    alert('Signature saved successfully.');
                } else {
                    alert('Failed to save signature.');
                }
            };
            xhr.send('imageData=' + encodeURIComponent(dataURL));
        }
    </script>
											
											
									
											
											
											
											<div class="col-md-12">
												<div class="form-group">
												 <input class="btn btn-success" type="submit" onClick="saveSignature()" value="Register your Program" />
													
													<div class="submitting"></div>
												</div>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>


	<script src="js/jquery.min.js"></script>
  <script src="js/popper.js"></script>
  <script src="js/bootstrap.min.js"></script>
  <script src="js/jquery.validate.min.js"></script>
  <script src="js/main.js"></script>

	</body>
</html>

