如何创建动态编辑表条目 [英] how to create dynamically edit table entries

查看:62
本文介绍了如何创建动态编辑表条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何创建一个dinamically编辑表条目。你能帮助我吗?谢谢。

i wish to know how to create a dinamically edit table entries .can u help me ?thanks.

推荐答案

一如既往,问题远比那么简单回答,但我会试一试。

以下示例是1个脚本处理3个阶段,即

PHASE 1:数据库数据显示在一个表(每个数据库行一个表行)并以更改按钮为前缀;

阶段2:所选行的数据显示在< textarea>中。可以修改的字段以及SAVE按钮;

阶段3:更改的行在数据库中更新。


没有值清理不要忘记它!

[PHP]<?php

/ **

*更改现有的电子邮件在表格行中加入。 MySql表设置:

* CREATE TABLE电子邮件(id INT(2)PRIMARY KEY AUTO_INCREMENT,电子邮件VARCHAR(30)DEFAULT'''');

* Parms通过在
As always the question is far more simple then the answer, but I''ll give it a try.
The following sample is a 1-script processing 3 phases, i.e.
PHASE 1 : the db data is displayed in a table (one table row per db row) and prefixed with a ''Change'' button;
PHASE 2 : the data of the selected row is shown in a <textarea> field that can be modified, along with a SAVE button;
PHASE 3 : the changed row is updated in the database.

There is no value cleansing in the sample, BUT DON''T forget it!
[PHP]<?php
/**
* Change an existing email adress in in a table row. MySql table setup:
* CREATE TABLE emailads (id INT(2) PRIMARY KEY AUTO_INCREMENT, email VARCHAR(30) DEFAULT '' '');
* Parms are passed in the


_GET或


_POST数组中,因此通过
_POST arrays, so they are extracted via

提取它们

这篇关于如何创建动态编辑表条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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