首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Ajax >

ajax jquery 异步表单证验的代码

2013-08-13 
ajax jquery 异步表单验证的代码ajax jquery实现异步表单验证。 html代码: ?php //异步验证 www.jbxue.com

ajax jquery 异步表单验证的代码
ajax jquery实现异步表单验证。

html代码:

<?php //异步验证 www.jbxue.com//进行连接服务器 $link=mysql_connect('localhost','root','sanyue'); if(!$link){ die('连接失败:'.mysql_error()); } //进行连接数据库 mysql_select_db('excour',$link); // $name=$_GET['name']; echo $name; $sql="select name from user_info where name='$name'"; //执行查询语句 $result=mysql_query($sql); if(mysql_num_rows($result) != 0){ echo "<font color='red'>名字太受欢迎,换一个吧</font>"; }else{ echo "<font color='blue'>成功</font>"; } //进行释放查询结果集 mysql_free_result($result); //关闭数据库连接 mysql_close($link); ?> 

热点排行