Commit e0a9997b authored by Srinivas's avatar Srinivas
Browse files

Update success22.php

parent 16baf53e
Pipeline #37747 failed with stage
<?php
session_start();
include('connection.php');
$connection = getdb();
?>
<!DOCTYPE html>
......@@ -152,8 +155,6 @@ window.onload = function(){
<?php
$x=$_GET['id'];
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,'test');
$query= "SELECT * FROM student where ID='$x' ";
$query_run = mysqli_query($connection,$query);
?>
......@@ -191,17 +192,16 @@ $status='applied';
date_default_timezone_set('Asia/Kolkata');
$date = date('y-m-d H:i:s');
$AppliedDateTime=$date;
$conn = new mysqli('localhost','root','','test');
if($conn->connect_error){
die('Connection Failed : '.$conn->connect_error);
if($connection->connect_error){
die('Connection Failed : '.$connection->connect_error);
}
else{
$stmt = $conn->prepare("insert into registrations(ID,NAME,ROOM,PHONE,TYPE,LeavingDate,status,AppliedDateTime,HostelName,reason)
$stmt = $connection->prepare("insert into registrations(ID,NAME,ROOM,PHONE,TYPE,LeavingDate,status,AppliedDateTime,HostelName,reason)
values(?,?,?,?,?,?,?,?,?,?)");
$stmt->bind_param("ississssss",$ID,$NAME,$ROOM,$PHONE,$TYPE,$LeavingDate,$status,$AppliedDateTime,$HostelName,$reason);
$stmt->execute();
$stmt->close();
$conn->close();
$connection->close();
}
?>
<div class="main1">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment