|
![](/images/resource/spacer.gif) |
|
มือใหม่สอบถาม code Delete ครับ พอดีผมกด Delete แล้วให้มันแจ้งเตือนผ่านไลน์ โดยอยากให้บอกด้วยน่ะครับว่า ใครเป็น คนลบ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ก็แทรกไปใน $message สิครับ
$message="มีการลบ โดย ".$user;
ปล. เอา code มาแปะนะครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2020-03-13 17:00:31 |
By :
mongkon.k |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
<?php
include "../dbconfig.php";
conndb();
$id = $_GET['id'];
$sql1 = "delete from booking_tb where id=$id";
$result1 = mysql_query($sql1);
/*---*/
function send_line_notify($message, $token)
{
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, "https://notify-api.line.me/api/notify");
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, "message=$message");
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
$headers = array( "Content-type: application/x-www-form-urlencoded", "Authorization: Bearer $token", );
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec( $ch );
curl_close( $ch );
}
$message = "มีการลบการจองห้องประชุม".
"\n". "โดยคุณ :: " . $username;
$token = 'mytoken';
echo send_line_notify($message, $token);
/*----*/
CloseDB();
echo "<meta http-equiv='refresh' content='0;url=manage_booking.php'>" ;
?>
ผมแทรกแล้วครับ อันนี้ username มันไม่แสดงออกมาน่ะครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2020-03-16 08:58:52 |
By :
panidpanid |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 03
|