Viewing file: certificateadd.php (2.11 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>ITCE BRANCH CONTROL 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">
<div id="print2"> <?php $con=mysqli_connect("localhost",'itce_user','rb!itc838',"itce_data"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$sql = "INSERT INTO certificate (CertificateNo, Name,father_name,Enrollment,address,Mobile, Course,Date_Reg,certifcate_issue_date,photo,branch,grade) VALUES ('$_POST[certificateno]','$_POST[studentname]','$_POST[fathername]','$_POST[rollno]','$_POST[address]', '$_POST[mobileno]', '$_POST[coursename]', '$_POST[joindate]', '$_POST[issuedate]', '$_POST[photo]','$user','$_POST[grade]')";
if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); }
mysqli_close($con);
?> <script type="text/javascript"> <!-- window.location = "allcertificateshow.php" //--> </script>
</td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"> <?php include('footer.php'); ?></td> </tr> </table>
</body></center> </html>
|