我在用户登录的页面上有一个时间输入电子邮件布局,并将提交工作时间。当我收到要发送的电子邮件时,它会像这样进入
{“action”:”ls_time_entry”,”origin”:”174″,”dateEntry”:””,”startTime”:””,”endTime”:””,”Staff”:”Y292DA7423A6E933″,”Matter”:”A6D67A7928CF5527″,”Discount_Note”:””,”Description”:””}
如何让它显示如下或至少接近这个:
Date:
Start Time:
End Time:
Staff:
Matter:
Discount Note:
Description:
答案 0 :(得分:0)
试试这个,替换第34行:
Map.merge
带
** (BadMapError) expected a map, got: [username: "max"]
stacktrace:
(stdlib) :maps.merge(%{name: "Some User", password: "supersecret", username: "user19DA79B623406098"}, [username: "max"])
我们的想法是使用$ _POST来获取单个值而不是JSON格式
你可以使用 br 或 / n 添加行返回(如果br不起作用)
$message = $json;
或
$message = "Date: ".$_POST['dateEntry']." Start Time: ".$_POST['startTime']. " End Time: ".$_POST['endTime']." Staff: ".$_POST['Staff']." Matter: ".$_POST['Matter']." Discount Note: ".$_POST['Discount_Note']." Description: ".$_POST['Description'];