JezK
Edit File: newRegistration.php
<?php $currentPage="newRegistration"; include("header.php"); include("app/getAllUsers.php"); ?> <div id="page-wrapper"> <div class="container-fluid"> <!-- Page Heading --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header text-center"> <small style="color: #333333;"> Registrations </small> </h1> </div> </div> <!-- /.row --> <div class="container main" > <!--<div class="col-md-6 col-md-offset-3"> <div class="form-group col-md-12"> <label class="col-md-4">Registration ID:</label> <input type="text" value="" id="registrationID" name="registrationID" class="col-md-8 inputText"> </div> <div class="col-md-12 text-center"> <input type="button" value="Search" name="search" id="search" class="btn btn-cs" onclick="retrieveData()"> </div> </div>--> <div class="col-md-12 table-responsive" id="sliInfo" style="display:block"> <table class="table" id="example"> <thead> <tr> <th>S.No</th> <th>Email ID</th> <th>Reference ID</th> <th>Name</th> <th>Constitution Type</th> <th>Action</th> </tr> </thead> <!--<tbody id="sliData"> </tbody>--> <tbody> <?php echo $registerUsers; ?> </tbody> </table> </div> </div> <!-- /.container-fluid --> </div> <!-- /#page-wrapper --> <?php include"footer.php"?> <script> function retrieveData() { var registrationID = document.getElementById('registrationID'); if(registrationID.value.trim() == '') { alert("Please enter registrationID."); registrationID.focus(); } else { $.post('app/ajax.php',{type:1,formSubmissionID:registrationID.value},function(data) { if(data == 0) { alert("Data not found.Invalid registrationID."); registrationID.focus(); } else if(data == -2) { alert("Incomplete form. Please fill all details.") } else { document.getElementById('sliInfo').style.display = "block"; document.getElementById('sliData').innerHTML = data; } }); } } </script>