在表单提交上更新表中的特定列值后显示成功消息 [英] Show success message after updating a particular column value in a table on form submit
本文介绍了在表单提交上更新表中的特定列值后显示成功消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?php
if(isset($_POST['submit']))
{
$branch=$_POST['Region'];
if($_POST['Region'] =='' || $_POST['Region']=='ALL')
{
$Qry="select Branch_code,Palmtec_id,Download_status from tbl_download order by Branch_code,Palmtec_id";
}
else
{
$Qry="select Branch_code,Palmtec_id,Download_status from tbl_download where Branch_code='$branch' order by Branch_code,Palmtec_id";
}
$macid=$_POST['brmacid'];
if($_POST['brmacid']=='' || $_POST['brmacid']=='ALL')
{
$Qry.="";
}
else
{
$Qry="select Branch_code,Palmtec_id,Download_status from tbl_download where Branch_code='$branch' and Palmtec_id='$macid' order by Branch_code,Palmtec_id";
}
$up=$_POST['up'];
if($_POST['up']=='0' || $_POST['up']=='1')
{
$Qry="update tbl_download set Download_status='$up' where Branch_code='$branch' and Palmtec_id='$macid'
(select Branch_code,Palmtec_id,Download_status from tbl_download
where Branch_code='$branch' and Palmtec_id='$macid')
";
}
$Res = mssql_query($Qry);
//echo $Qry;
echo "<table border ='1' align ='center' cellpadding='1' cellspacing='1' width='900' bgcolor='#FFFFFF' style='border:1px solid #0080FF;' >" ;
echo "<tr><th style='background:#58ACFA;'>S.No</th>
<th style='background:#58ACFA;'>Branch_code</th>
<th style='background:#58ACFA;'>Palmtec_id</th>
<th style='background:#58ACFA;'>Download_status</th></tr>";
我尝试过:
我曾尝试过Javascript弹出窗口,但问题是我有三个字段...每个字段在按钮点击时显示警告消息......我想创建一个条件,只有当更新时,警报框必须工作.. .orelse它必须被禁用...任何人都可以帮助我吗? Plz ...
What I have tried:
I had tried Javascript popup but the problem is I have three fields...every field displays alert message on button click......I want to create a condition like only when an update is made the alert box must work...orelse it has to be disabled... Can anyone help me out? Plz...
推荐答案
_POST [' submit' ]))
{
_POST['submit'])) {
branch =
_POST [' Region'];
if(
_POST['Region']; if(
这篇关于在表单提交上更新表中的特定列值后显示成功消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文