数据未从表单传输到mysql表(未发生数据更新) [英] Data not transfred from form to mysql table (updating of data is not happening)

查看:236
本文介绍了数据未从表单传输到mysql表(未发生数据更新)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,谢谢大家

我很累,无法找到答案,我正在寻找答案.我的问题是我无法更新在表单中输入的值.我已经附加了我正在使用MYSQL数据库读取数据的所有文件.

I tired and was unable to find the answer i am looking for an answer. my problem is that i am unable to update the values enterd in the form. I have attached all the files i'm using MYSQL database to fetch data.

发生的事情是,我能够使用Ajax和PHP脚本向MYSQL数据库添加和删除表单中的记录,但是我无法更新从数据库中检索到的数据. 文件结构如下

what happens is that i'm able to add and delete records from form using ajax and PHP scripts to MYSQL database, but i am not able to update data which was retrived from database. the file structure is as follows

index.php 是一个具有Ajax功能的文件,在其中显示用于使用save.php文件向MYSQL添加新数据的表单,并且所有记录的列表都可以在不刷新页面的情况下查看(称为加载列表). php可以从index.php查看所有记录,并且可以使用save.php来保存表单中的数据)

index.php is a file with ajax functions where it displays form for adding new data to MYSQL using save.php file and list of all records are view without refrishing page (calling load-list.php to view all records from index.php works fine, and save.php to save data from form)

-> 删除是一个从index.php调用的ajax函数,用于从mysql数据库中删除记录(调用delete.php的函数工作正常)

-> Deleteis an ajax function called from index.php to delete record from mysql database (function calling delete.php works fine)

-> 更新是从index.php调用的ajax函数,可通过从mysql表格中检索特定记录来使用update-form.php更新数据,(工作正常)

-> Update is an ajax function called from index.php to update data using update-form.php by retriving specific record from mysql tabel, (works fine)

问题在于更新数据 update-form.php到update.php(其中 更新查询已写入mysql)

Problem lies in updating data from update-form.php to update.php (in which update query is wrriten for mysql)

最后我尝试了很多方法,我发现数据没有从update-form.php传输到update.php,而jquery ajax函数存在一个小问题,即它没有将数据传输到update.php.页面.

i had tried in many ways at last i had figured out that data is not being transfred from update-form.php to update.php there is a small problem in jquery ajax function where it is not transfering data to update.php page.

任何人都可以纠正这个问题吗????我对他们非常满意. 请在下面找到所有文件的链接

can any one correct this ????? i will be greatfull to them..... please find the link below for all files

链接以获取我的表单文件

推荐答案

我编写了一个程序,但是它没有用"

"I wrote a program and it isn't working"

对此问题的一般回答只有一个:调试.
该术语代表一种技术,它使程序员可以在代码中发现错误.
实际上,调试花费了大部分时间来开发程序.去图吧.
要其他人为您调试代码就是要他们为您完成工作.免费.

The general answer to such a question is only one: debugging.
This term stands for a technique that allows a programmer to find an error in the code.
As a matter of fact, debugging take most of time spent to develop a program. Go figure.
Asking other people to debug your code for you is to ask them to do your job for you. For free.

如果您不是程序员,请考虑雇用一个.
如果您想成为程序员,请尽快开始学习调试
从这里开始的文章: https://www.ibm.com/developerworks/库/os-debug/

If you aren't a programmer, consider to hire one.
If you wannabe-programmer, start to learn debugging as soon as possible
Here is an article to start: https://www.ibm.com/developerworks/library/os-debug/

由于AJAX应用程序较难调试,因此建议您先编写没有AJAX的应用程序,使其正常运行,然后再实施AJAX程序.

Since AJAX applications are harder to debug, I'd advice to write your app without AJAX first, make it working, and only then implement AJAX bells and whistles.

这篇关于数据未从表单传输到mysql表(未发生数据更新)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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