Viewing file: exampagedemo.php (10.39 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> फॉर्म को भरने के बाद प्रश्न करे </title> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css"> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a { color:#5D5D9E; } a:visited { color:#5D5D9E; } a:active { color:#5C615E; } a:hover { color:#B2B3B4; } @media only screen and (max-width: 450px) { #container_f645165 { width:100% !important; } #container_5f0116bc { width:100% !important; } #container_4915d68c { width:100% !important; } } </style>
<script type='text/javascript'> $(document).ready(function(){ $("img.a").hover( function() { $(this).stop().animate({"opacity": "0"}, "slow"); }, function() { $(this).stop().animate({"opacity": "1"}, "slow"); });
}); </script> <style type="text/css"> table { border: 0px solid green; border-collapse: collapse; width:100%; }
table td { border: 0px solid green; }
table td.shrink { white-space:nowrap } table td.expand { width: 99% } </style> <style>
.table {
table-layout:fixed; width:500px;
border-collapse:collapse;
}
.header th {
font-family:Calibri; font-size:small; font-weight:lighter;
border-left:1px solid #000; background:#d0d0d0;
}
.body_panel {
display:inline-block; width:520px; height:300px; overflow-y:scroll;
}
.body tr {
border-bottom:1px solid #d0d0d0;
}
.body td {
border-left:1px solid #d0d0d0; padding-left:3px;
font-family:Calibri; font-size:small;
overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
} </style> </head> <center> <body class="w3-container"> <form id="form1" name="form1" action="calcultor.php" method="post" enctype="multipart/form-datas"> <b><h3>ऑनलाइन परीक्षा </h3><b> <br> फॉर्म को भरने के बाद प्रश्न हल करे - <table width="100%" border="0"> <tr> <td align="left" bgcolor="#66CCFF">नाम </td> <td colspan="5" align="left" bgcolor="#66CCFF"> <input name="stdname" type="text" id="stdname" tabindex="1" size="20" maxlength="20" required="required" /> </td> </tr> <tr> <td width="105" align="left" bgcolor="#66CCFF">पिता का नाम </td> <td colspan="4" align="left" bgcolor="#66CCFF"><input name="fname" type="text" id="fname" size="20" maxlength="80" required="required" /> </td> </td> </tr> <tr> <td align="left" bgcolor="#66CCFF">कक्षा </td> <td colspan="5" align="left" bgcolor="#66CCFF"><input name="classes" type="text" id="classes" size="10" maxlength="80" required="required" /> </td> </tr> <tr> <td align="left" bgcolor="#66CCFF">स्कूल/कोचिंग का नाम </td> <td colspan="5" align="left" bgcolor="#66CCFF"> Your School Name: <?php // Create connection $con=mysqli_connect("localhost","rcgi_schooluser","rb!sch838","rcgi_schooldata");
// Check connection if (mysqli_connect_errno())
// Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else { echo "We are connected."; } $FD='FD';
$result = mysqli_query($con,"SELECT ID, school_name FROM school_name ");
echo " <select name=\"school\" id=\"school\" >\n";
while($row = mysqli_fetch_array($result)) { echo "<option value='" . $row['school_name'] . "'>" . $row['school_name'] . "</option>"; } echo " </select>\n"; ?> </td> </tr> </table> <?php include('divider/divider.php'); ?> <?php include 'connect.php';?> <?php // Get the search variable from URL $var = 1; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=5;
// check for an empty string and display a message. if ($trimmed == "") { exit; }
// check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; }
// Build SQL Query $query = "select * from centerlogin WHERE username like '$user' "; // EDIT HERE and specify your table and field names for the SQL query
$numresults=mysql_query($query); $numrows=mysql_num_rows($numresults);
// If we have no results, offer a google search as an alternative
if ($numrows == 0) {
}
// next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; }
// get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query");
$sr=0; // begin to show results set $count = 1 + $s ; $amountss=0;
// now you can display the results returned while ($row= mysql_fetch_array($result)) {
$semister=$row[semister];
$count++ ; }
$currPage = (($s/$limit) + 1);
//break before paging echo "";
// next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print "<a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a> "; }
// calculate number of pages needing links $pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from division
?> <script> <!--
/* Count down then redirect script By JavaScript Kit (http://javascriptkit.com) Over 400+ free scripts here! */
//change below target URL to your own var targetURL="http://amitprabha.in/calcultor.php" //change the second to start counting down from var countdownfrom=3600
var currentsecond=document.redirect.redirect2.value=countdownfrom+1 function countredirect(){ if (currentsecond!=1){ currentsecond-=1 document.redirect.redirect2.value=currentsecond } else{ window.location=targetURL return } setTimeout("countredirect()",1000) }
countredirect() //--> </script> <?php include('connect.php'); ?> <?php // Get the search variable from URL $var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable
// rows to return $limit=30;
// check for an empty string and display a message.
//connect to your database ** EDIT REQUIRED HERE **
// Build SQL Query $query = "select * from pschooltest order by RAND () "; // EDIT HERE and specify your table and field names for the SQL query
$numresults=mysql_query($query); $numrows=mysql_num_rows($numresults);
// If we have no results, offer a google search as an alternative
if ($numrows == 0) { echo " Sorry, $trimmed this Number is not found";
}
// next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; }
// get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); $srno=0;
// begin to show results set
$count = 1 + $s ;
// now you can display the results returned while ($row= mysql_fetch_array($result)) { $answer=$row[correctanswer]; $srno=$srno+1; echo "<div style=\"text-align:left;\">\n"; echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:100%; min-height:150px; background-color:#C0C0C0; background: linear-gradient(to bottom, #CBCBFB, #C0C0C0); \" id=\"container_6530c995\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_6530c995_padding\" >\n"; echo " <div style=\"text-align:left;\">\n";
echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:33%; min-height:80px; background:none; \" id=\"container_f645165\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_f645165_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <span style=\"font-size:12pt; font-family:Arial, Helvetica, sans-serif; color:#000000; \"><font color='red'><b> $srno</b> :-<h2>$row[question]</h2></font></span>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n";
echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:33%; min-height:150px; background:none; \" id=\"container_5f0116bc\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_5f0116bc_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <span style=\"font-size:12pt; font-family:Arial, Helvetica, sans-serif; color:#000000; \">
<input type=\"radio\" name='radiocount[$srno]' id=\"radiocount[$srno]\" value='a' /> $row[wronganswer1] <br>
<input type=\"radio\" name='radiocount[$srno]' id=\"radiocount[$srno]\" value='b' /> $row[wronganswer2]<br>
<input type=\"radio\" name=\"radiocount[$srno]\" id=\"radiocount[$srno]\" value='c' /> $row[wronganswer3]<br>
<input type=\"radio\" name=\"radiocount[$srno]\" id=\"radiocount[$srno]\" value='d' /> $row[wronganswer4] <input type=\"hidden\" name='cans[$srno]' id=\"cans[$srno]\" value=\"$row[correctanswer]\" /> <input type=\"hidden\" name='countss' id=\"countss\" value='$srno' /> <input type=\"hidden\" name='rollnos' id=\"countss\" value='$rollnoss' /> </span>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n";
echo " <div style=\"clear:both\"></div>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo "\n";
echo "<hr></hr>"; echo "<br>"; $count++ ; }
$currPage = (($s/$limit) + 1);
//break before paging echo "";
// next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print "<a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a> "; }
// calculate number of pages needing links $pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from division
?> <center> <input name="submi" type="submit"> </center> </form> </td> </tr> </table>
</body></center> </html>
|