updated event adding and editing descriptions to textarea instead of regular text
Did this to allow for multiple lines of text to be added and shown properly.
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
include "db_config.php";
|
||||
include "db_config.php";
|
||||
$conn = mysqli_connect($servername, $username, $password, $db);
|
||||
|
||||
$event_id = mysqli_real_escape_string($conn, $_POST['event']);
|
||||
$description = mysqli_real_escape_string($conn, $_POST['description']);
|
||||
$description = $_POST['description'];
|
||||
$is_ongoing = mysqli_real_escape_string($conn, $_POST['is_ongoing']);
|
||||
$end_date_time = mysqli_real_escape_string($conn, $_POST['end_date_time']);
|
||||
$user = mysqli_real_escape_string($conn, $_POST['user']);
|
||||
@ -36,10 +36,10 @@ if($result){
|
||||
//Set Email Info
|
||||
$to = "TO-EMAIL@DOMAIN.COM";
|
||||
$subject = "Updated BMS Alert: ".$unitname." ".$alertname."";
|
||||
$headers = "From: FROM-EMAIL@DOMAIN>COM";
|
||||
$headers = "From: FROM-EMAIL@DOMAIN.COM";
|
||||
$message = "BMS Unit: ".$unitname." \n Type of Alert: ".$alertname." \n Start Date / Time: ".$start_date_time." \n End Date / Time: ".$end_date_time." \n Description: ".$description." \n Updated by: ".$user." \n Event Link: https://DOMAIN.com/bms/viewevent.php?eventid=$event_id \n \n This message generated by https://DOMAIN.com/bms";
|
||||
//WordWrap the message
|
||||
$message_wrapped = wordwrap($message, 70, "\n", true);
|
||||
//WordWrap the message
|
||||
$message_wrapped = wordwrap($message, 70, "\n", true);
|
||||
//Send the email
|
||||
mail($to,$subject,$message_wrapped,$headers);
|
||||
} else{
|
||||
|
Reference in New Issue
Block a user