fordev22.com
  • Home
  • สอนทำระบบ POS (Point of Sale)
  • Flutter สำหรับผู้เริ่มต้น
  • PHP+MySqli
  • เนื้อหาอื่น ๆ
    • สอน Bootstrap 5
    • Dreamweaver+Bootstrap+PHP
    • Dreamweaver
    • Computer Tip
  • ABOUT US
    • Personal information
    • บริการ
    • ผลงาน
    • ตัวอย่าง ผลงานด้านการสอน (สอนสดผ่าน Google Meet, Zoom)
  • Search

(2023) PHP+MySqli EP.43 How to AJAX CrudPHP MySqli (Part 3 Delete)

April 21, 2023/in PHP+MySqli /by fordev22

(2023) PHP+MySqli EP.43
How to AJAX CrudPHP MySqli
(Part 3 Delete)

 

 

 


ระบบบริหารจัดการ ศูนย์ซ่อมรถยนต์ Car Service System ( PHP 7++ ขึ้นไป )

 

ตัวอย่างผลงาน FD22 Logistic 2020 ระบบบริหารจัดการขนส่ง

ระบบ บริหารจัดการร้านกาแฟ PHP | FD22-Cafe (Coffee AND Bakery)

CART&POS (ระบบจัดการงานขายหน้าร้านและ ออนไลน์ สำหรับร้านค้าขนาดกลาง,SME

เว็บไซต์ จองคิวทำเล็บ MANICURE SYSTEM ( PHP 7++ ขึ้นไป )

(2023) PHP+MySqli EP.42 How to AJAX CrudPHP MySqli (Part 2 Update)

ajax_view.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<a href="#deleteEmployeeModal" class="delete" data-id="<?php echo $row["id"]; ?>" data-toggle="modal"><i class="material-icons" data-toggle="tooltip"
title="Delete"></i></a>
<!-- Delete Modal HTML -->
<div id="deleteEmployeeModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<form>
<div class="modal-header">
<h4 class="modal-title">Delete User</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<input type="hidden" id="id_d" name="id" class="form-control">
<p>Are you sure you want to delete these Records?</p>
<p class="text-warning"><small>This action cannot be undone.</small></p>
</div>
<div class="modal-footer">
<input type="button" class="btn btn-default" data-dismiss="modal" value="Cancel">
<button type="button" class="btn btn-danger" id="delete">Delete</button>
</div>
</form>
</div>
</div>
</div>

ajax_crud.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$(document).on("click", ".delete", function() {
var id=$(this).attr("data-id");
$('#id_d').val(id);
});
$(document).on("click", "#delete", function() {
$.ajax({
url: "save_db.php",
type: "POST",
cache: false,
data:{
type:3,
id: $("#id_d").val()
},
success: function(dataResult){
$('#deleteEmployeeModal').modal('hide');
$("#"+dataResult).remove();
}
});
});

save_db.php

1
2
3
4
5
6
7
8
9
10
11
12
13
if(count($_POST)>0){
if($_POST['type']==3){
$id=$_POST['id'];
$sql = "DELETE FROM `crud` WHERE id=$id ";
if (mysqli_query($conn, $sql)) {
echo $id;
}
else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
}
}

 

 

Facebook
Twitter
Line
Tags: php, php+sqli php+sqli, Point of Sale Point of SalePOS POS, POS System POS System, ฟรีโปรเจคนักศึกษา, ฟอร์ม php, รับพัฒนาระบบ รับพัฒนาระบบ, รับเขียนโปรแกรม รับเขียนโปรแกรม, สอน bootstrap, สอน php, สอน php mysql, สอน php mysqli, สอน php พื้นฐาน, สอน php เบื้องต้น, สอนทำเว็บ, สอนทำเว็บ สอนทำเว็บ, สอนพัฒนาระบบ สอนพัฒนาระบบ, สอนเขียนเว็บ, สอนเขียนเว็บ สอนเขียนเว็บ, สอนเขียนโปรแกรม สอนเขียนโปรแกรม, เขียนโปรแกรมราคาถูก เขียนโปรแกรมราคาถูก, แจกระบบ php, แจกโคด php, โปรเจคคอมธุ, โปรเจคคอมพิวเตอร์, โปรเจคคอมพิวเตอร์ธุรกิจ, โปรเจคจบ คอมพิวเตอร์, โปรเจคนักศึกษา, โปรเจควิทยาการคอม Share this entry
Share this entry
  • Share on Facebook
  • Share on Twitter
  • Share on Google+
  • Share on Pinterest
  • Share on Linkedin
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://fordev22.com/wp-content/uploads/2023/04/aj3.jpg 720 1280 fordev22 https://fordev22.com/wp-content/uploads/2018/08/logo_fordev22_2.png fordev222023-04-21 18:15:102023-04-22 12:19:11(2023) PHP+MySqli EP.43 How to AJAX CrudPHP MySqli (Part 3 Delete)
You might also like
สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 41. การนำ QR-Code มาใช้งาน
Bootstrap EP.13 การเพิ่มข้อมูลรูปภาพภาพอื่น ๆ ที่เกี่ยวข้องโดยใช้ Database 2 ตารางร่วมกันและลบข้อมูลที่เกี่ยวข้อง 2 ตารางร่วมกันแบบเขียนโค๊ด
Bootstrap EP.20(ตอนที่2) โปรแกรมค้นหาข้อมูลแบบหลายเงือนไขที่เป็นช่วงวันที่และช่วงตัวเลข(Multi Search)
Bootstrap EP.12 การเพิ่มข้อมูลรูปภาพแบบเขียนโค๊ด และแก้ไขข้อมูลที่มีรูปภาพ แบบเขียนโค๊ด
PHP+MySqli EP.18 การนำข้อมูลจาก Database มาทำกราฟ (Chart With php)
Bootstrap EP.26 การใส่ font ให้กับเว็บไซต์
PHP+MySqli EP.34 Convert Date Picker พ.ศ.To ค.ศ. (โดยใช้ functions explode ต่อจาก EP.33)
(2023) PHP+MySqli EP.39 ติดตั้ง MPDF ใน PHP V8.2++ เพื่อออกรายงานเป็น PDF

บริการและผลงาน

  • Home
  • Personal Information
  • คอสเรียนที่เปิดอยู่
  • ตัวอย่าง ผลงานด้านการสอน (สอนสดผ่าน Google Meet, Zoom)
  • บริการ
  • ผลงาน

ช่องทางการติดต่อ

Tel. 090-959-1107

ID Line. fordza4you

E-mail. fordza4you@gmail.com


รับพัฒนาระบบ
รับพัฒนาเว็บแอพพลิเคชั่น
รับพัฒนาเว็บไซต์

Page

Popular
  • (2025) สอน ใช้งาน Telegram Bot API เพื่อการแจ้งแตือนข้อความ...February 28, 2025 - 10:48 pm
  • Computer Tip EP.2 การปรับเสียง...October 13, 2016 - 10:13 pm
  • Dreamweaver EP.1 ลงโปรแกรมจำลอง...October 15, 2016 - 9:28 pm
  • Dreamweaver EP.2 สร้าง Database ด้วย ...October 16, 2016 - 12:48 pm
  • Dreamweaver EP.3 การสร้างที่เก็บเว็บไซต์และสร้าง...October 16, 2016 - 6:33 pm
Recent
  • (2025) สอน ใช้งาน Telegram Bot API เพื่อการแจ้งแตือนข้อความ...February 28, 2025 - 10:48 pm
  • (2025) สอน ใช้งาน Telegram Bot API เพื่อการแจ้งแตือนข้อความ...February 22, 2025 - 1:39 pm
  • (2025) สอน ใช้งาน Telegram Bot API เพื่อการแจ้งแตือนข้อความ...February 21, 2025 - 10:19 pm
  • (2025) สอน ใช้งาน Telegram Bot API เพื่อการแจ้งแตือนข้อความ...February 20, 2025 - 4:21 pm
  • สอน Flutter Ep 4. ติดตั้ง SDK Simulator...June 7, 2023 - 1:54 pm
Comments
  • sssssMay 4, 2017 - 11:52 am by fordev22
  • sssssMay 4, 2017 - 11:50 am by fordev22
  • Awaiting BACS payment Order status changed from Pending...March 1, 2017 - 9:23 am by WooCommerce
Tags
Bootstrap Database Datatable Datatable Serverside Dreamweaver Flutter beginner course Flutter coding for beginners Flutter tutorial Learn Flutter php php+sqli php+sqli php+sqli Point of Sale Point of SalePOS POS POS System POS System showe Sqli sqli xampp กับ dreamweaver ฟรีโปรเจคนักศึกษา ฟอร์ม php รับพัฒนาระบบ รับพัฒนาระบบ รับเขียนโปรแกรม รับเขียนโปรแกรม สอน bootstrap สอน php สอน php mysql สอน php mysqli สอน php พื้นฐาน สอน php เบื้องต้น สอนทำเว็บ สอนทำเว็บ สอนทำเว็บ สอนพัฒนาระบบ สอนพัฒนาระบบ สอนเขียนเว็บ สอนเขียนเว็บ สอนเขียนเว็บ สอนเขียนโปรแกรม สอนเขียนโปรแกรม เขียนโปรแกรมราคาถูก เขียนโปรแกรมราคาถูก เพิ่มข้อมูล แจกระบบ php แจกโคด php โปรเจคคอมธุ โปรเจคคอมพิวเตอร์ โปรเจคคอมพิวเตอร์ธุรกิจ โปรเจคจบ คอมพิวเตอร์ โปรเจคนักศึกษา โปรเจควิทยาการคอม โปรเจควิทยาการคอม Share this entry โปรเจควิทยาการคอม Share this entry Share this entry

Copyright@2018.fordev22.com

(2023) PHP+MySqli EP.42 How to AJAX CrudPHP MySqli (Part 2 Update) สอน Flutter Ep 1. วิธีติดตั้ง Flutter และ...
Scroll to top