詳解php+ajax開發(fā)的注意事項(xiàng)(4)_PHP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:解析用PHP操作MySql數(shù)據(jù)庫?php /* *mysql數(shù)據(jù)庫分頁類 *@packagepagelist *@authoryytcpt(無影) *@version2008-03-27 *@copyrigthhttp://www.d5s.cn/ */ /* *分頁樣式 .page{float:left;font:11pxArial,Helvetica,sans-serif;padding:6px0;margin:0px10%;margin-top:10px;} .pagea,.pa
php文件
<?php
header("Content-Type:text/html;charset=UTF-8");
conn=mysql_connect(’localhost’,’root’,’bus’);
mysql_select_db(’test’,conn);
mysql_query("SET CHARACTER SET UTF8");
curName=GET[’name’];
if(emptyempty(curName)){
echo "新帳號不能為空";
exit();
}
tSQL="SELECT uid FROM members WHERE username =’curName’";
try{
result=mysql_query(tSQL) OR die(mysql_error());
row = mysql_num_rows(result);
flush();
if(row>0){
echo "false";
}else{
echo "true";
}
mysql_free_result(result);
mysql_close(conn);
}catch(Exception e){
print e->getMessage();
}
?>
分享:解析用PHP操作MySql數(shù)據(jù)庫(DB類)?php /* *mysql數(shù)據(jù)庫DB類 *@packagedb *@authoryytcpt(無影) *@version2008-03-27 *@copyrigthhttp://www.d5s.cn/ */ classdb{ varconnection_id=; varpconnect=0; varshutdown_queries=array(); varqueries=array(); varquery_id=; varquery_count=0; v
相關(guān)PHP教程:
- PHPNOW安裝Memcached擴(kuò)展方法詳解
- php記錄頁面代碼執(zhí)行時(shí)間
- PHP中獎(jiǎng)概率的抽獎(jiǎng)算法程序代碼
- apache設(shè)置靜態(tài)文件緩存方法介紹
- php對圖像的各種處理函數(shù)代碼小結(jié)
- PHP 關(guān)于訪問控制的和運(yùn)算符優(yōu)先級介紹
- 關(guān)于PHP語言構(gòu)造器介紹
- php/js獲取客戶端mac地址的實(shí)現(xiàn)代碼
- php5.5新數(shù)組函數(shù)array_column使用
- PHP preg_match的匹配多國語言的技巧
- php 中序列化和json使用介紹
- php采集文章中的圖片獲取替換到本地
- 相關(guān)鏈接:
- 教程說明:
PHP教程-詳解php+ajax開發(fā)的注意事項(xiàng)(4)
。