跳转到主内容
趣航编程网 - 趣学编程,启航技术之路!

PHP利用Ajax联接到数据库

PHP利用Ajax连接到数据库直接亮出来代码好了 这个是一个添加文章类别功能的页面sortadd.php$link=mysql_connect("localhost","root","8346322");mysql_select_db("wp",$link);$GB2312string=iconv('UTF-8','gb2312//IGNORE',$RequestAjaxString);mysql_query("set names gb2312");$sql=mysql_query("select distinct * from wp_jargon group by jargon_text");$result=mysql_fetch_object($sql);do{header('Content-type:text/html;charset=GB2312');?>jargon_explain;?>}while($result=mysql_fetch_object($sql));?>然后是checksort.php php

运行结果是:

如果添加的框是空的,还可以正常跳出提示对话框;但是如果不为空的时候就出错,几乎没什么相应。求求高手来解决下

相关文章