列出表数据,并带有删除每个项目的选项。 [英] Listing table data with an option to delete each individual item.

查看:53
本文介绍了列出表数据,并带有删除每个项目的选项。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否有人可以帮我解决PHP,MySQL问题。我是PHP和MySQL全新的
。我一直试图找到一种方法从网页上的表格中找到
列表数据,并在每个单独的项目之后

有一个超链接,允许用户删除列出的信息。可以

有人帮忙吗?




姓名年龄性别

------ ------------------------------------

Adam 21 M删除

贝蒂22楼删除

克里斯23米删除

雏菊24楼删除


---- -------------------------------------------------- -------------------------------------------------- ----------------------

(在''Sex''之后删除将是删除整行的超链接
(行)来自表格。

Was wondering if anyone could help me with a PHP, MySQL problem. I am
completely new to PHP and MySQL. I have been trying to find a way to
list data from a table on a web page and after each individual item
have a hyperlink to allow users to delete the information listed. Can
anyone help?

i.e.
Name Age Sex
------------------------------------------
Adam 21 M delete
Betty 22 F delete
Chris 23 M delete
Daisy 24 F delete

------------------------------------------------------------------------------------------------------------------------------
(delete after ''Sex'' would be the hyperlink to delete that entire line
(row) from the table).

推荐答案

我觉得最好用id号做事。您显示的表格

显然每个记录都有一个主键。所以在php中你做了

sql语句类似

i find it best to do thing with id numbers. the table you have shown
will obviously have a primary key for each record. so in php you do the
sql statement something like


result = mysql_query(" select id,name,age,来自人的性别,
result = mysql_query("select id, name, age, sex from people",


db);

if(
db);
if (


这篇关于列出表数据,并带有删除每个项目的选项。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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