fordev22.com
  • Home
  • สอนทำระบบ POS (Point of Sale)
  • Flutter สำหรับผู้เริ่มต้น
  • PHP+MySqli
  • เนื้อหาอื่น ๆ
    • 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 (Point of Sale) ระบบขายหน้าร้าน Ep 0. แนะนำระบบและ Function การทำงาน
Bootstrap EP.4 การใส่ Slide ให้เว็บไซต์สวยงาม
PHP+MySqli EP.26 Preview an image before it is uploaded and uploaded to database (Past 2)
สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 37. สร้างไฟล์Status(บันทึกการสั่งซื้อ Part 9)
PHP+MySqli EP.19 Data Table With Php (การใช้งาน datatable ร่วมกับ php+mysqli)
สอนทำระบบ POS (ระบบขายหน้าร้าน) Ep 38. สร้างไฟล์ orderdetail(บันทึกการสั่งซื้อ Part 10)
Bootstrap EP.26 การใส่ font ให้กับเว็บไซต์
Dreamweaver+Bootstrap+PHP EP.30 การเขียน php ส่งข้อความ แจ้งเตือน line notify api

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

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

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

Tel. 090-959-1107

ID Line. fordza4you

E-mail. fordza4you@gmail.com


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

Page

Popular
  • (2023) PHP+MySqli EP.43 How to AJAX CrudPHP MySqli (Part...April 21, 2023 - 6:15 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
  • (2023) PHP+MySqli EP.43 How to AJAX CrudPHP MySqli (Part...April 21, 2023 - 6:15 pm
  • (2023) PHP+MySqli EP.42 How to AJAX CrudPHP MySqli (Part...April 20, 2023 - 12:45 pm
  • (2023) PHP+MySqli EP.41 How to AJAX CrudPHP MySqli (Part...April 19, 2023 - 4:07 pm
  • (2023) PHP+MySqli EP.40 How to Backup MySQL Database using...April 10, 2023 - 10:53 pm
  • สอนทำระบบ POS (ระบบขายหน้าร้าน)...April 2, 2023 - 2:10 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 Edit Sqli Mysqli php php+sqli php+sqli php+sqli Point of Sale Point of SalePOS POS POS System POS System showe Sqli sqli xampp กับ dreamweaver ฟรีโปรเจคนักศึกษา ฟอร์ม php รับพัฒนาระบบ รับพัฒนาระบบ รับเขียนโปรแกรม รับเขียนโปรแกรม ลบข้อมูล สร้าง Database สอน bootstrap สอน php สอน php mysql สอน php mysqli สอน php พื้นฐาน สอน php เบื้องต้น สอนทำเว็บ สอนทำเว็บ สอนทำเว็บ สอนพัฒนาระบบ สอนพัฒนาระบบ สอนเขียนเว็บ สอนเขียนเว็บ สอนเขียนเว็บ สอนเขียนโปรแกรม สอนเขียนโปรแกรม เขียนโปรแกรมราคาถูก เขียนโปรแกรมราคาถูก เพิ่มข้อมูล เพิ่มรูป แจกระบบ php แจกโคด php โปรเจคคอมธุ โปรเจคคอมพิวเตอร์ โปรเจคคอมพิวเตอร์ธุรกิจ โปรเจคจบ คอมพิวเตอร์ โปรเจคนักศึกษา โปรเจควิทยาการคอม โปรเจควิทยาการคอม Share this entry

Copyright@2018.fordev22.com

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