Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/projectaug2017/spicmckay/
Upload File :
Current File : /var/www/html/venkat/projectaug2017/spicmckay/submit.php

<?php
include("session.php");
include("db1.php");
$$name = $_POST['name'];
$description = $_POST['description'];
if (strlen($name) > 5 && strlen($description) > 10 ) {
	$stmt = $conn->prepare("INSERT INTO spicmckay (ldapid, name, description) VALUES (:id, :name, :description)");
	$stmt->bindParam(':id', $id);
	$stmt->bindParam(':name', addslashes($_POST['name']));
	$stmt->bindParam(':description', addslashes($_POST['description']));
	if($stmt->execute()) {
		echo "<b> <center> <font color = 'blue'> Sucessfully Submitted </font>  </center> </b> <br> <br>";
	}

	$sql = $conn->prepare("SELECT name,description FROM spicmckay where ldapid = :id");
	$sql->bindValue(':id',$id);
	$sql->execute();
	$row = $sql->rowCount();
	if($row > 0) {
		while ($row = $sql->fetch()) {
			$name = $row['name'];
			$description = $row['description'];
		}
	?>
	<div align = "center">
		 <table width = "70%"> 
			<tr  colspan = "3"> <td> <b> Your Details </b>  </td> </tr>
		 	<tr> <td width = "10%"> <br> Your Name </td> <td width = "5%">   <br> : </td>  <td width = "50%"> <br>  <?php echo $name ?> </td>  </tr>
		 	<tr> <td> <br> Your ID </td> <td>   <br> : </td>  <td> <br>  <?php echo $id ?> </td> </tr>  
		 	<tr> <td> <br> Description </td> <td>   <br> : </td>  <td> <br>  <?php echo $description ?> </td>  </tr>
		</table>
 	 

	<br>
	<a href = "edit.php"> For Update click here </a>
	
	</div>
<?php
	}
}
else {
	header("location:login_success.php");
}
?>