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
76d523a0
Commit
76d523a0
authored
Jun 09, 2017
by
Andry F. Hutapea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perubahan
parent
7c50f840
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
53 deletions
+0
-53
main_pengumuman.php
main_pengumuman.php
+0
-53
No files found.
main_pengumuman.php
deleted
100644 → 0
View file @
7c50f840
<?php
$host
=
"localhost"
;
// Host name
$username
=
"root"
;
// Mysql username
$password
=
""
;
// Mysql password
$db_name
=
"tbc"
;
// Database name
$tbl_name
=
"fpengumuman"
;
// 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"
);
$sql
=
"SELECT * FROM
$tbl_name
ORDER BY id DESC"
;
// OREDER BY id DESC is order result by descending
$result
=
mysqli_query
(
$conn
,
$sql
);
$no
=
0
;
?>
<table
width=
"30%"
border=
"2"
align=
"left"
cellpadding=
"3"
cellspacing=
"1"
bgcolor=
"#CCCCCC"
>
<tr>
<img
src=
"foto/IMG_20170311_103634.jpg"
>
</tr>
</table>
<table
width=
"70%"
border=
"0"
align=
"right"
cellpadding=
"3"
cellspacing=
"1"
bgcolor=
"#CCCCCC"
>
<tr>
<td
width=
"10%"
align=
"center"
bgcolor=
"#E6E6E6"
><strong>
No
</strong></td>
<td
width=
"53%"
align=
"center"
bgcolor=
"#E6E6E6"
><strong>
Topic Pengumuman
</strong></td>
<td
width=
"13%"
align=
"center"
bgcolor=
"#E6E6E6"
><strong>
Date/Time
</strong></td>
</tr>
<?php
// Start looping table row
while
(
$rows
=
mysqli_fetch_array
(
$result
)){
?>
<tr>
<td
align=
"center"
bgcolor=
"#FFFFFF"
>
<?php
echo
++
$no
;;
?>
</td>
<td
align=
"center"
bgcolor=
"#FFFFFF"
><a
href=
"view_pengumuman.php?id=
<?php
echo
$rows
[
'id'
];
?>
"
>
<?php
echo
$rows
[
'topic'
];
?>
</a><BR></td>
<td
align=
"center"
bgcolor=
"#FFFFFF"
>
<?php
echo
$rows
[
'datetime'
];
?>
</td>
</tr>
<?php
// Exit looping and close connection
}
//mysql_close();
?>
</table>
\ No newline at end of file
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