Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > ขอถามเกี่ยวกับ message box หน่อยค่ะ เวลากดลบแล้วอยากให้มันเด้งขึ้นมา



 

ขอถามเกี่ยวกับ message box หน่อยค่ะ เวลากดลบแล้วอยากให้มันเด้งขึ้นมา

 



Topic : 101690



โพสกระทู้ ( 132 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter Facebook



พอกดคำว่าลบ แล้วอยากให้มี message box ขึ้นมา ถามก่อนค่ะ ว่า คุณต้องการลบหรือไม่

ไม่แน่ใจว่าใช้ JavaScript ด้วยใช่มั้ยคะ คือไม่ถนัดเรื่องนี้เลยค่ะ (._.)

จะต้องใส่ไว้ตรงบรรทัดไหนหรอคะ

ขอบคุณมากๆค่ะ

message box


โค้ดตามนี้ค่ะ Code (PHP)
<?php require_once('Connections/AddDataCustomers.php'); 
include("header.php");
mysql_query("SET NAMES UTF8");
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_AddDataCustomers, $AddDataCustomers);
$query_ShowData = "SELECT * FROM data_customers";
$ShowData = mysql_query($query_ShowData, $AddDataCustomers) or die(mysql_error());
$row_ShowData = mysql_fetch_assoc($ShowData);
$i=1;
$totalRows_ShowData = mysql_num_rows($ShowData);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <center>
    <p><b>ข้อมูลลูกค้าที่นำเครื่องมาซ่อม</b> </p>
    <p>&nbsp;</p>
</center>
  


<table width="1039" border="0" align="center">
  <tr>
    <td align="center" bgcolor="#00CC66"><strong>ลำดับ</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>ชื่อ</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>นามสกุล</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>ยี่ห้อมือถือ</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>เบอร์ติดต่อ</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>วันที่มาซ่อม</strong></td>
    <td align="center" bgcolor="#00CC66"><strong>บริการที่เข้ารับ</strong></td>
    <td colspan="2" align="center" bgcolor="#00CC66"><strong>ตัวเลือก</strong></td>
  </tr>
  <?php do { ;   ?>
    <tr>
      <td><?php echo $i++; ?></td>
      <td><?php echo $row_ShowData['ctm_name']; ?></td>
      <td><?php echo $row_ShowData['ctm_surname']; ?></td>
      <td><?php echo $row_ShowData['ctm_product']; ?></td>
      <td><?php echo $row_ShowData['ctm_tel']; ?></td>
      <td><?php echo $row_ShowData['ctm_date']; ?></td>
      <td><?php echo $row_ShowData['ctm_fix']; ?></td>
      <td align="center"><a href="delete.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>">ลบ</a></td>
      <td align="center"><a href="update.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>">แก้ไข</a></td>
    </tr>
    <?php   }   while ($row_ShowData = mysql_fetch_assoc($ShowData));  ?>
</table>
<p>&nbsp;</p>

 <center><form id="form1" name="form1" method="post" action="search.php">
   <label for="word"> ค้นหา :</label>
    <input type="text" name="word" id="word" />
    <input type="submit" name="btnsearch" id="btnsearch" value="Submit" />
  </form></center>
</body>
</html>
<?php
mysql_free_result($ShowData);
?>





Tag : PHP, Ms Access, JavaScript, Ajax







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-10-15 12:46:34 By : aorplus View : 917 Reply : 2
 

 

No. 1



โพสกระทู้ ( 4,169 )
บทความ ( 7 )

Hall of Fame 2012

สถานะออฟไลน์


Code (PHP)
<a href="delete.php?ctm_id=<?php echo $row_ShowData['ctm_id']; ?>" onclick="return confirm('คุณแน่ใจที่จะลบ <?php echo $row_ShowData['ctm_name']; ?>');">ลบ</a>







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-10-15 13:01:33 By : Ex-[S]i[L]e[N]t
 


 

No. 2



โพสกระทู้ ( 132 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter Facebook

ได้แล้วค่ะ ขอบคุณมากๆนะคะ


ประวัติการแก้ไข
2013-10-15 13:06:12
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-10-15 13:02:59 By : aorplus
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ขอถามเกี่ยวกับ message box หน่อยค่ะ เวลากดลบแล้วอยากให้มันเด้งขึ้นมา
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่