Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TB_Center
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Andry F. Hutapea
TB_Center
Commits
c57ef439
Commit
c57ef439
authored
May 25, 2017
by
Loni Miranda Doloksaribu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In Progress
parent
206f7cbe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
128 additions
and
0 deletions
+128
-0
view_pemesanan.php
view_pemesanan.php
+128
-0
No files found.
view_pemesanan.php
0 → 100644
View file @
c57ef439
<?php
session_start
();
include_once
(
'config/koneksi.php'
);
open_page
(
'booking'
);
?>
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<link
href=
"css/metro-bootstrap.css"
rel=
"stylesheet"
>
<link
href=
"css/metro-bootstrap-responsive.css"
rel=
"stylesheet"
>
<link
href=
"css/iconFont.css"
rel=
"stylesheet"
>
<link
href=
"css/docs.css"
rel=
"stylesheet"
>
<!-- Load JavaScript Libraries -->
<script
src=
"js/jquery/jquery.min.js"
></script>
<script
src=
"js/jquery/jquery.widget.min.js"
></script>
<script
src=
"js/jquery/jquery.mousewheel.js"
></script>
<!-- Metro UI CSS JavaScript plugins -->
<script
src=
"js/load-metro.js"
></script>
<!-- Local JavaScript -->
<script
src=
"js/docs.js"
></script>
<title>
Booking Paket
</title>
</head>
<body
class=
"metro"
>
<header
class=
"bg-darkCobalt"
data-load=
"atasan.php"
></header>
<?php
$host
=
"localhost"
;
// Host name
$username
=
"root"
;
// Mysql username
$password
=
""
;
// Mysql password
$db_name
=
"tiket"
;
// Database name
$tbl_name
=
"fpemesanan"
;
// Table name
// Connect to server and select databse.
$conn
=
mysqli_connect
(
"
$host
"
,
"
$username
"
,
"
$password
"
)
or
die
(
"cannot connect"
);
mysqli_select_db
(
$conn
,
"
$db_name
"
)
or
die
(
"cannot select DB"
);
// get value of id that sent from address bar
$id
=
$_GET
[
'id'
];
$sql
=
"SELECT * FROM
$tbl_name
WHERE id='
$id
'"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
$rows
=
mysqli_fetch_array
(
$result
);
?>
<BR>
<?php
$tbl_name2
=
"fapply"
;
// Switch to table "forum_answer"
$sql2
=
"SELECT * FROM
$tbl_name2
WHERE question_id='
$id
'"
;
$result2
=
mysqli_query
(
$conn
,
$sql2
);
while
(
$rows
=
mysqli_fetch_array
(
$result2
)){
?>
<table
width=
"400"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"1"
bgcolor=
"#CCCCCC"
>
<tr>
<td><table
width=
"100%"
border=
"0"
cellpadding=
"3"
cellspacing=
"1"
bgcolor=
"#F8F7F1"
>
<tr>
<td
width=
"77%"
bgcolor=
"#F8F7F1"
colspan=
"3"
><strong>
Name :
</strong>
<?php
echo
$rows
[
'a_name'
];
?>
<br><strong>
Email :
</strong>
<?php
echo
$rows
[
'a_email'
];
?>
</td>
</tr>
<tr>
<td
bgcolor=
"#F8F7F1"
colspan=
"3"
></td>
</tr>
<tr>
<td
bgcolor=
"#F8F7F1"
colspan=
"3"
>
<?php
echo
$rows
[
'a_answer'
];
?>
</td>
</tr>
<tr>
<td
bgcolor=
"#F8F7F1"
colspan=
"3"
style=
"text-align: right"
>
<?php
echo
$rows
[
'a_datetime'
];
?>
</td>
</tr>
</td>
</tr>
</table><br>
<?php
}
$sql3
=
"SELECT view FROM
$tbl_name
WHERE id='
$id
'"
;
$result3
=
mysqli_query
(
$conn
,
$sql3
);
$rows
=
mysqli_fetch_array
(
$result3
);
$view
=
$rows
[
'view'
];
// if have no counter value set counter = 1
if
(
empty
(
$view
)){
$view
=
1
;
$sql4
=
"INSERT INTO
$tbl_name
(view) VALUES('
$view
') WHERE id='
$id
'"
;
$result4
=
mysqli_query
(
$conn
,
$sql4
);
}
// count more value
$addview
=
$view
+
1
;
$sql5
=
"update
$tbl_name
set view='
$addview
' WHERE id='
$id
'"
;
$result5
=
mysqli_query
(
$conn
,
$sql5
);
?>
</BR></td></tr></table></center>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div></div>
<footer
class=
"dark"
data-load=
"bawahan.php"
></footer>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment