Viewing file: certificateprints.php (4.67 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('session.php'); ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PURUSHOTTAM COMPUTER CLASSES BRANCH PANEL</title> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } body { background-color: #CCC; } </style> </head> <center> <body> <table width="100%" border="0" bgcolor="#FFFFFF"> <tr> <td > <?php include('header.php'); ?></td> </tr> <tr> <td colspan="2"><table width="100%" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('menubar.php'); ?></td> </tr> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('sessisionbar.php'); ?></td> </tr> </table> </td> </tr> <tr> <td colspan="2" align="center"> <?php $var = $_GET['ID']; $trimmed = trim($var); //trim whitespace from the stored variable /* Attempt MySQL server connection. Assuming you are running MySQL server with default setting (user 'root' with no password) */ $link = mysqli_connect("localhost", "pcclasses_user", "rb!pcc838", "pcclasses_data"); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } $field = 'certificate_no'; // Attempt select query execution $sql = "SELECT * FROM certificate where certificate_no like \"$trimmed\" order by ID "; if($result = mysqli_query($link, $sql)){ if(mysqli_num_rows($result) > 0){
$serial=0;
while($row = mysqli_fetch_array($result)){ $image="<img border='1' width='150' height='150' src=http://pcclasses.in/branch/upload/".$row['photo'].">"; $certificate_no= $row['certificate_no']; $rollno= $row['roll_no']; $studentname=$row['student_name']; $fathers_name=$row['fathers_name']; $roll_no=$row['roll_no']; $address=$row['address']; $course_name=$row['course_name'];
$total_marks=$row['total_marks']; $obtained_marks=$row['obtained_marks']; $grade=$row['grade']; $serial=$serial+1;
echo "<p class=\"auto-style1\">Purushottam Computer Classes </p>\n"; echo "<p class=\"auto-style2\"><a href=\"http://www.pcclasses.in\">www.pcclasses.in</a> \n"; echo "</p>\n"; echo "<p class=\"auto-style2\">Certificate Verification</p>\n"; echo "<table style=\"width: 100%\">\n"; echo " <tr>\n"; echo " <td style=\"width: 225px\">Certificate No</td>\n"; echo " <td style=\"width: 438px\">$certificate_no</td>\n"; echo " <td rowspan=\"8\" align='left'>$image</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px; height: 23px\">Student Name</td>\n"; echo " <td style=\"height: 23px; width: 438px\">$studentname</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px; height: 23px\">Father Name</td>\n"; echo " <td style=\"height: 23px; width: 438px\">$fathers_name</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px; height: 23px\">Roll No</td>\n"; echo " <td style=\"height: 23px; width: 438px\">$roll_no</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px\">Address</td>\n"; echo " <td style=\"width: 438px\">$address</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px; height: 23px\">Course Name</td>\n"; echo " <td style=\"height: 23px; width: 438px\">$course_name</td>\n"; echo " </tr>\n";
echo " <tr>\n"; echo " <td style=\"width: 225px\">Total Marks</td>\n"; echo " <td style=\"width: 438px\">$total_marks</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px\">Obtained Marks</td>\n"; echo " <td style=\"width: 438px\">$obtained_marks</td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td style=\"width: 225px\">Grade</td>\n"; echo " <td style=\"width: 438px\">$grade</td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo "</table>\n";
$count++ ; }
echo "</table>\n"; // Free result set mysqli_free_result($result); } else{ echo "Certificate Number Incorrect."; } } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } // Close connection mysqli_close($link); ?>
<?php include('phpqrcode/index.php'); ?> </td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"> <?php include('footer.php'); ?></td>GTLJMKMK;POPPPPPLMHHQQ </tr> </table>
</body></center> </html>
|