adding more descriptive error message and taking out one of the useless buttons on index page
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user