单击行值之一后如何更新行值 [英] How to Update a row value after clicking on one of its column value

查看:85
本文介绍了单击行值之一后如何更新行值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我想在单击列值之一后更新行值.
在PHP中.

值来自网页中的数据库

Hi friends,

I want to update a row value after clicking one of the column value.
in PHP.

value coming from database as in webpage

Id  name    status.
1   raj     pending ---> this is a hyperlink button
2   raj     pending
3   raj     pending
4   raj     pending


我想要如果单击待处理的按钮",那么我可以运行任何查询,仅通过该查询可以更新此行的结果.

我可以使用此查询来更新表名,将其状态设置为status ="approve",其中id = 1,但是我不确定单击按钮时仅采用该id是来自数据库的值.

谢谢.


I want if click on "pending button" then I can run any query by which I can update the result of this row only.

I can use this query that update table name set status="approve" where id=1 but i am not sure that when click on the button it only take that id the value coming from database.

Thanks.

推荐答案


我找到了解决办法.

将此添加到该列

比用approve.php创建页面
然后在此处添加此代码

Hi,
i find the solution.

Add this to that column

Than create a page with approve.php
then add this code there

<?php
 include("../dbconfig.php");


id =


_REQUEST [' apply_id']; // echo
_REQUEST['apply_id']; // echo


这篇关于单击行值之一后如何更新行值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆