Your IP : 216.73.216.40


Current Path : /var/www/html/rkala/data/
Upload File :
Current File : /var/www/html/rkala/data/students.php

<html>
	<head>
		<style>
			#myImg {
			    border-radius: 5px;
			    cursor: pointer;
			    transition: 0.3s;
			}
			
			#myImg:hover {opacity: 0.7;}

			/* The Modal (background) */
			.modal {
			    display: none; /* Hidden by default */
			    position: fixed; /* Stay in place */
			    z-index: 1; /* Sit on top */
			    padding-top: 100px; /* Location of the box */
			    left: 0;
			    top: 0;
			    width: 100%; /* Full width */
			    height: 100%; /* Full height */
			    overflow: auto; /* Enable scroll if needed */
			    background-color: rgb(0,0,0); /* Fallback color */
			    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
			}

			/* Modal Content (image) */
			.modal-content {
			    margin: auto;
			    display: block;
			    width: 200%;
			    max-width:700px;
			}

			/* Caption of Modal Image */
			#caption {
			    margin: auto;
			    display: block;
			    width: 80%;
			    max-width: 700px;
			    text-align: center;
			    color: #ccc;
			    padding: 10px 0;
			    height: 150px;
			}

			/* Add Animation */
			.modal-content, #caption {  			 
			    -webkit-animation-name: zoom;
			    -webkit-animation-duration: 0.6s;
			    animation-name: zoom;
			    animation-duration: 0.6s;
			}

			@-webkit-keyframes zoom {
			    from {-webkit-transform:scale(0)} 
			    to {-webkit-transform:scale(1)}
			}

			@keyframes zoom {
			    from {transform:scale(0)} 
			    to {transform:scale(1)}
			}

			.rotate90 {
			    -webkit-transform: rotate(90deg);
			    -moz-transform: rotate(90deg);
			    -o-transform: rotate(90deg);
			    -ms-transform: rotate(90deg);
			    transform: rotate(90deg);
			}

			/* The Close Button */
			.close {
			    position: absolute;
			    top: 15px;
			    right: 35px;
			    color: #f1f1f1;
			    font-size: 40px;
			    font-weight: bold;
			    transition: 0.3s;
			}

			.close:hover,
			.close:focus {
			    color: #bbb;
			    text-decoration: none;
			    cursor: pointer;
			}

			/* 100% Image Width on Smaller Screens */
			@media only screen and (max-width: 700px){
			    .modal-content {
				width: 100%;
			    }
			}
		</style>	
				
		<script src="js/jquery-2.1.3.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="css/bootstrap.min.css">
		
		  <style>
		  .modal-header, h4, .close {
		      background-color: #5cb85c;
		      color:white !important;
		      text-align: center;
		      font-size: 30px;
		  }
		  .modal-footer {
		      background-color: #f9f9f9;
		  }
		  </style>		  	
		<script type="text/javascript">
			$(document).ready(function (e) {
				$("[id^=input_form]").on('submit',(function(e) {
					e.preventDefault();
					$.ajax({
						url: "tester/sam3.php",
						type: "POST",
						data:  new FormData(this),
						contentType: false,
			    	    		cache: false,
						processData:false,
						timeout:15000,
						beforeSend: function()
						{
							$("#targetLayer").html("Fetching");	
						},
						success: function(data)
					    	{

							$("#targetLayer").html(data);
					    	},
					  	error: function() 
					    	{
							$("#targetLayer").html("ERROR");
					    	}	        
				   	});
				}));
			});
		</script>
	</head>
	<body>

		<h1 align="center">
			Students
		</h1>
		<h3  align="center">
			<form id="input_form" action="students.php" method="POST">
			<select name = "roll">
			<?php
				include 'tester/credential.php';
				mysql_connect($host, $user, $pass);
				mysql_select_db('proto_type');

				$insert_image="select * from student";

				$result = mysql_query($insert_image);
				$i = 1;

				while($row = mysql_fetch_array($result)){   //Creates a loop to loop through results
					//echo $i. " : " . $row[0];
					//$i += 1;
					//echo "<a href = 'insert_data.php?roll=".$row[0]."'>". $row[1] . "</a><br>";
			?>
				<option value="<?php echo $row[0]; ?>"> <?php echo $row[0] . " - " . $row[1]; ?> </option>
			<?php
				}

				mysql_close();
			?>
			</select>
			<select name = "question">
			<?php
				include 'credential.php';
				mysql_connect($host, $user, $pass);
				mysql_select_db('proto_type');

				$insert_image="select * from question";

				$result = mysql_query($insert_image);
				$i = 1;

				while($row = mysql_fetch_array($result)){   //Creates a loop to loop through results
					//echo $i. " : " . $row[0];
					//$i += 1;
					//echo "<a href = 'insert_data.php?roll=".$row[0]."'>". $row[1] . "</a><br>";
			?>
				<option value="<?php echo $row[0]; ?>"> <?php echo $row[3] . " . m.m = " . $row[2]; ?> </option>
			<?php
				}

				mysql_close();
			?>
			</select><br>
			<input type="submit" value="Submit" class="btnSubmit" />
			</form>
		</h3>
		<div id="targetLayer">
		
		</div>
		<!-- <img id="myImg" src="tester/images/lion.jpg" alt="Trolltunga, Norway" width="300" height="200"> -->
		
		<div id="myModal" class="modal fade" role="dialog">
			<div class="modal-dialog">
				<div class="modal-content" style="transform:rotate(90deg);">
				    <div class="modal-body" >
				        <img class="img-responsive" src=""/>
				    </div>
				    <div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			       	    </div>
		 		</div>
		 	</div>
		</div>				
		
	</body>
</html>