Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed
  • Loading branch information
etl12003 committed Apr 25, 2017
1 parent cf45512 commit 1dec2ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Wello/www/admin.php
Expand Up @@ -74,7 +74,7 @@ $query = "SELECT CONCAT(Well_Street_Number, ' ', Well_Street_Name) AS 'WellAddre
</a>
<div class="actions">
<a href="http://wellreportapp.uconn.edu/admin.php?move='.$row["Permit_Number"].'">Approve</a>
<a href="http://wellreportapp.uconn.edu/form.php?Admin=1?Well_ID='.$row["Permit_Number"].'">Edit</a>
<a href="http://wellreportapp.uconn.edu/form.php?Admin=1&Well_ID='.$row["Permit_Number"].'">Edit</a>
</div>
</div>
';
Expand Down
9 changes: 6 additions & 3 deletions Wello/www/form.php
@@ -1,10 +1,10 @@
<?php
require 'cred.php';
$mysqli = new mysqli("localhost", $username, $password, $database);
if ( (isset($_GET['Well_ID'])) && (is_numeric($_GET['Well_ID'])) ) {
if ( (isset($_GET['Well_ID'])) /* && (is_numeric($_GET['Well_ID'])) */ ) {
$Well_ID = $_GET['Well_ID'];
}
else if ( (isset($_POST['Well_ID'])) && (is_numeric($_POST['Well_ID'])) ) {
elseif ( (isset($_POST['Well_ID'])) /*&& (is_numeric($_POST['Well_ID']))*/ ) {
$Well_ID = $_POST['Well_ID'];
}
else {
Expand Down Expand Up @@ -108,7 +108,7 @@ if($_SERVER['REQUEST_METHOD']=='POST') {
}

if ($_GET['Admin'] == 1) {
echo'<script>alert("hi");</script>';
// echo'<script>alert("hi");</script>';
$query = "SELECT
Date_Well_Completed,
Date_of_Report,
Expand Down Expand Up @@ -201,6 +201,9 @@ else {
$Admin = 0;
}


echo'<script>alert("' .$query. '");</script>';

if ($result = $mysqli->query($query)) {
$row = $result->fetch_assoc();
foreach ($row as &$value) {
Expand Down

0 comments on commit 1dec2ba

Please sign in to comment.