-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joshua Burgin
committed
Apr 19, 2018
1 parent
60c412f
commit afc8c90
Showing
7 changed files
with
325 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
body { | ||
font-family: 'Helvetica', sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
text-align: center; | ||
font-family: 'Helvetica', sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
text-align: center; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
margin: 0 auto; | ||
border-collapse: collapse; | ||
margin: 0 auto; | ||
} | ||
|
||
th, td { | ||
border: 1px solid #000; | ||
padding: 5px 10px; | ||
font-weight: normal; | ||
border: 1px solid #000; | ||
padding: 5px 10px; | ||
font-weight: normal; | ||
} | ||
|
||
h3 { | ||
margin: 0 0 10px; | ||
margin: 0 0 10px; | ||
} | ||
|
||
.section { | ||
text-align: center; | ||
padding: 25px 0; | ||
border-bottom: 1px solid #eee; | ||
overflow: auto; | ||
text-align: center; | ||
padding: 25px 0; | ||
border-bottom: 1px solid #eee; | ||
overflow: auto; | ||
} | ||
|
||
select, input { | ||
width: 150px; | ||
margin-bottom: 10px; | ||
height: 28px; | ||
font-size: 15px; | ||
width: 150px; | ||
margin-bottom: 10px; | ||
height: 28px; | ||
font-size: 15px; | ||
} | ||
|
||
input { | ||
text-indent: 8px; | ||
text-indent: 8px; | ||
} | ||
|
||
button { | ||
margin-bottom: 15px; | ||
margin-bottom: 15px; | ||
} | ||
|
||
form { | ||
width: 260px; | ||
margin: 0 auto; | ||
width: 260px; | ||
margin: 0 auto; | ||
} | ||
|
||
.form-group { | ||
width: 100%; | ||
text-align: left; | ||
float: left; | ||
clear: both; | ||
width: 100%; | ||
text-align: left; | ||
float: left; | ||
clear: both; | ||
} | ||
|
||
.form-group label { | ||
float: left; | ||
clear: both; | ||
margin-bottom: 5px; | ||
float: left; | ||
clear: both; | ||
margin-bottom: 5px; | ||
} | ||
|
||
.form-group input { | ||
float: left; | ||
clear: both; | ||
width: 100%; | ||
float: left; | ||
clear: both; | ||
width: 100%; | ||
} | ||
|
||
.button { | ||
background: #6AC2D7; | ||
padding: 10px 15px; | ||
color: #fff; | ||
display: inline-block; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
font-size: 16px; | ||
border: none; | ||
clear: both; | ||
background: #6AC2D7; | ||
padding: 10px 15px; | ||
color: #fff; | ||
display: inline-block; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
font-size: 16px; | ||
border: none; | ||
clear: both; | ||
} | ||
|
||
a.return-link { | ||
display: inline-block; | ||
margin-top: 20px; | ||
} | ||
display: inline-block; | ||
margin-top: 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
<?php | ||
$user = "jsburgin"; | ||
$cwid = "11484207"; | ||
$server = "cs-sql2014.ua-net.ua.edu"; | ||
// create the connection to mySQL | ||
$con = new mysqli($server, $user, $cwid, $user); | ||
$tables = $con->query("SHOW TABLES"); | ||
function getRows($con, $tname) { | ||
return $con->query("SELECT * FROM " . $tname); | ||
} | ||
function getColumns($con, $tname) { | ||
return $con->query("SHOW COLUMNS FROM ". $tname); | ||
} | ||
<?php | ||
$user = "jsburgin"; | ||
$cwid = "11484207"; | ||
$server = "cs-sql2014.ua-net.ua.edu"; | ||
// create the connection to mySQL | ||
$con = new mysqli($server, $user, $cwid, $user); | ||
$tables = $con->query("SHOW TABLES"); | ||
|
||
function getRows($con, $tname) { | ||
return $con->query("SELECT * FROM " . $tname); | ||
} | ||
|
||
function getColumns($con, $tname) { | ||
return $con->query("SHOW COLUMNS FROM ". $tname); | ||
} | ||
?> | ||
|
||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Task 3</title> | ||
<link href="/~jsburgin/style.css" rel="stylesheet" /> | ||
<title>Task 3</title> | ||
<link href="/~jsburgin/style.css" rel="stylesheet" /> | ||
</head> | ||
|
||
<body> | ||
<a href="/~jsburgin" class="return-link">Return to Main Page</a> | ||
<?php | ||
while ($table = mysqli_fetch_row($tables)) { | ||
$columns = getColumns($con, $table[0]); | ||
$rows = getRows($con, $table[0]); ?> | ||
<div class="section"> | ||
<h3><?php echo $table[0] ?></h3> | ||
<table> | ||
<thead> | ||
<tr> | ||
<?php while ($column = mysqli_fetch_row($columns)) { ?> | ||
<th><?php echo $column[0]; ?></th> | ||
<?php } ?> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php while ($row = mysqli_fetch_row($rows)) { ?> | ||
<tr> | ||
<?php foreach($row as $value) {?> | ||
<td><?php echo $value ?></td> | ||
<?php } ?> | ||
</tr> | ||
<?php } ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<?php } ?> | ||
<a href="/~jsburgin" class="return-link">Return to Main Page</a> | ||
<?php | ||
while ($table = mysqli_fetch_row($tables)) { | ||
$columns = getColumns($con, $table[0]); | ||
$rows = getRows($con, $table[0]); ?> | ||
|
||
<div class="section"> | ||
<h3><?php echo $table[0] ?></h3> | ||
<table> | ||
<thead> | ||
<tr> | ||
<?php while ($column = mysqli_fetch_row($columns)) { ?> | ||
<th><?php echo $column[0]; ?></th> | ||
<?php } ?> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php while ($row = mysqli_fetch_row($rows)) { ?> | ||
<tr> | ||
<?php foreach($row as $value) {?> | ||
<td><?php echo $value ?></td> | ||
<?php } ?> | ||
</tr> | ||
<?php } ?> | ||
</tbody> | ||
</table> | ||
</div> | ||
<?php } ?> | ||
</body> | ||
</html> | ||
</html> |
Oops, something went wrong.