adding more descriptive error message and taking out one of the useless buttons on index page

This commit is contained in:
Bryan
2019-11-26 00:29:29 -05:00
parent 74eedc9961
commit 0bf67e78d1
2 changed files with 1 additions and 3 deletions

View File

@@ -17,8 +17,6 @@
<br><br>
<button type="button" onclick="window.location.href = '/messages.html'">See Messages</button>
<br><br>
<button type="button" onclick="window.location.href = '/contacts.html'">See Contacts</button>
<br><br>
<button type="button" onclick="window.location.href = '/search.php'">Search</button>
<br><br>
<button type="button" onclick="window.location.href = '/sendMessage.php'">Message Someone</button>

View File

@@ -28,7 +28,7 @@ mysqli_query($db, $query0) or die('Error querying database.');
$maxID = mysqli_query($db, $query0);
$maxID = $maxID + 1;
$query1 = "Insert into messages (messageID, sender, recipient, message, date, haveread) values({$maxID}, , {$username}, {$message}, NOW(), 'N')";
mysqli_query($db, $query1) or die('Error querying database.');
mysqli_query($db, $query1) or die('Error inserting into database.');
mysqli_close($db);
?>