| Current Path : /var/www/html/venkat/projectaug2017/bh5/ |
| Current File : /var/www/html/venkat/projectaug2017/bh5/submit.php |
<?php
include("session.php");
include("db1.php");
$a = 0;
if(!isset($_POST['name'])) {
$a = 1;
}
if(!isset($_POST['number'])) {
$a = 1;
}
if(!isset($_POST['type'])) {
$a = 1;
}
if(!isset($_POST['ifsc'])) {
$a = 1;
}
$stmt = $conn->prepare("INSERT INTO bh5submit (rollno, name, number, type, ifsc) VALUES (:rollno, :name, :number, :type, :ifsc)");
if ($a == 0) {
$stmt->bindParam(':name', addslashes($_POST['name']));
$stmt->bindParam(':number', addslashes($_POST['number']));
$stmt->bindParam(':type', addslashes($_POST['type']));
$stmt->bindParam(':ifsc', addslashes($_POST['ifsc']));
$stmt->bindParam(':rollno', $id);
$stmt->execute();
}
else {
header("location:pchoose.php");
}
?>
<?php
$sql = $conn->prepare("SELECT rollno,name,number,type,ifsc FROM bh5submit where rollno = :rollno");
$sql->bindValue(':rollno',$id);
$sql->execute();
$row = $sql->rowCount();
if($row > 0) {
while ($row = $sql->fetch()) {
$rollno = $row['rollno'];
$name = $row['name'];
$number = $row['number'];
$type = $row['type'];
$ifsc = $row['ifsc'];
}
?>
<div align = "left">
<b> Your Account Details for reference </b> <br>
Your Roll Number: <?php echo $rollno ?> <br>
Name of the Account Holder: <?php echo $name ?> <br>
Account Number: <?php echo $number ?> <br>
Account type: <?php echo $type ?> <br>
Account IFSC: <?php echo $ifsc ?> <br>
</div>
<?php
}
?>