如何使用表格填写表格? [英] How can I use table and fill it?

查看:101
本文介绍了如何使用表格填写表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个页面可以将数据插入数据库(MySql).我想在TextBox中写入数据时,将其值插入数据库(确定)并显示在一个表中(也确定).

我的问题是这样的:
当我单击要插入的按钮时,我会在页面中看到数据,但是当我插入第二条记录时,第一条记录正在页面中清洗并显示记录2.
我想插入第二条记录时,它显示在页面中并在第一条记录的下方.

我该怎么做?

Hi everybody,

I have a page to insert data to database (MySql). I would like when I write data in TextBox it value is inserted into the database (This is OK) and show in one table (This is OK too).

My problem is this:
When I click on button to insert, I see the data in the page, but when I insert second record, the first record is cleaning in page and show record two.
I would like when I insert second record it is shown in the page and below the first record.

How can I do this?

推荐答案

我有两种解决方案:
1,插入数据后,从数据库读回并写在页面上.或者,
2,使用Ajax或jQuery在页面上追加数据.
I have two solutions:
1, After data is inserted, read it back from database and write on page. Or,
2, Use Ajax or jQuery to append data on page.


选中以下各项以显示记录:

http://www.plus2net.com/php_tutorial/php_mysql_data_display.php [ http://www.brightcherry.co.uk /scribbles/2008/11/14/mysql-php-show-tables-in-database/ [ http://www.siteground.com/tutorials/php-mysql/display_table_data.htm [ ^ ]

如果您可以发布代码,我们可以为您提供更好的服务.
希望对您有所帮助:)
check these to display records:

http://www.plus2net.com/php_tutorial/php_mysql_data_display.php[^]

http://www.brightcherry.co.uk/scribbles/2008/11/14/mysql-php-show-tables-in-database/[^]

http://www.siteground.com/tutorials/php-mysql/display_table_data.htm[^]

If you can post your code, we can serve you better.
hope it helps :)


@synctor:您能发给您代码进行分析.
@synctor: could you please post you code for analysis.


这篇关于如何使用表格填写表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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