Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/course/evaluation/
Upload File :
Current File : /var/www/html/venkat/course/evaluation/editsubmit.php

<?php
include("db1.php");
include("session.php");
$a = 0;
$stmt = $conn->prepare("UPDATE researchdaystudent set Roll_No = :rollno, Name = :name, Paper_Title = :title, Department = :department, Dept = :dept, User = :id, Ytitle = :ytitle where User = :id");
$rollno = addslashes($_POST['rollno']);
$stmt->bindParam(':rollno', addslashes($_POST['rollno']));
$stmt->bindParam(':name', addslashes($_POST['name']));
$stmt->bindParam(':title', addslashes($_POST['title']));
$stmt->bindParam(':ytitle', addslashes($_POST['ytitle']));
$d = addslashes($_POST['department']);
if($d == "Information Technology") {
	$dept = "IT";
}elseif($d == "Applied Science") {
	$dept = "AS";
}elseif($d == "Electronics and Communication Engineering") {
	$dept = "EC";
}elseif($d == "Management Studies") {
	$dept = "MS";
}
$stmt->bindParam(':department', $d);
$stmt->bindParam(':dept', $dept);
$stmt->bindParam(':id', $id);
if($stmt->execute()) {
                //echo "<b> <center> <font color = 'blue'> Sucessfully updated </font>  </center> </b> <br> <br>";
        }
else {
echo "hi";
}
$sql = $conn->prepare("SELECT Roll_No FROM researchdaystudent where Roll_No = :id");
$sql->bindValue(':rollno',$id);
$sql->execute();
$row = $sql->rowCount();
if($row <= 0) {
	if($stmt->execute()) {
        	echo "<b> <center> <font color = 'blue'> <br>Sucessfully Submitted </font>  </center> </b> <br> <br>";
	}
	$sql = $conn->prepare("SELECT Ytitle, Roll_No, Name, Paper_Title, Department, Dept FROM researchdaystudent where User = :rollno");
	$sql->bindValue(':rollno',$id);
	$sql->execute();
	$row = $sql->rowCount();
	if($row > 0) {
	        while ($row = $sql->fetch()) {
	                $name = $row['Name'];
	                $rollno = $row['Roll_No'];
	                $ytitle = $row['Ytitle'];
	                $dacronym = $row['Dept'];
	                $title = $row['Paper_Title'];
	                $dept = $row['Department'];
	        }
	?>
	<div align = "center">
	         <table> 
	                <tr  colspan = "3"> <td> <b> Your Submission </b>  </td> </tr>
	                <tr> <td> <br> Your Name </td> <td>   <br> : </td>  <td> <br>  <?php echo $ytitle.$name ?> </td>  </tr>
	                <tr> <td> <br> Your Roll Number </td> <td>   <br> : </td>  <td> <br>  <?php echo $rollno ?> </td> </tr> 
        	        <tr> <td> <br> Your Paper Title </td> <td>   <br> : </td>  <td> <br>  <?php echo $title ?> </td>  </tr>
		        <tr> <td> <br> Your Department </td> <td>   <br> : </td>  <td> <br>  <?php echo $dept ?> </td>  </tr>
		        <tr> <td> <br> Department Acronym </td> <td>   <br> : </td>  <td> <br>  <?php echo $dacronym ?> </td>  </tr>
	        </table>
        
	<br>
 	<a href = "edit.php"> For Update click here </a>
	</div>
<?php
	}
}
else {
        header("location:login_success.php");
	//	echo "<b> <center> <font color = 'blue'> <br>Already Submitted </font>  </center> </b> <br> <br>";
}