-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtariadd1.php
More file actions
31 lines (30 loc) · 765 Bytes
/
tariadd1.php
File metadata and controls
31 lines (30 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<body bgcolor="#fff3e5">
<?php
$type=$_POST["txttype"];
$isgl=$_POST["txtisgl"];
$idbl=$_POST["txtidbl"];
$usgl=$_POST["txtusgl"];
$udbl=$_POST["txtudbl"];
$avrm=$_POST["txtaroom"];
$totrm=$_POST["txttroom"];
include "connection.php";
$qusr="select type from tariff where type='".$type."'";
$rsuser=mysqli_query($qusr);
if(mysqli_num_rows($rsuser)>0)
{
echo "<font color=#7c0000 size=5>PLEASE CHECK ROOM TYPE.</font>";
die();
}
$qins="insert into tariff (type,inrsin,inrdbl,usdsin,usddbl,avroom,totroom) values ('$type',$isgl,$idbl,$usgl,$udbl,$avrm,$totrm)";
if(mysqli_query($qins))
{
echo "<br><font color=#7c0000 size=5>Successfully add.</font>";
}
else
{
die("<b>Incorrect insert query.</b><br>".$qins);
}
?>
</body>
</html>