php案頭中心(二) 資料庫寫入_PHP教程

來源:互聯網
上載者:User
一、以下是資料庫的寫入的html程式,你可以加入密碼功能。把密碼做成變數發入下面那個寫入的php程式。這樣就實現了密碼保護了:


資料庫






資料庫管理程式



查看資料庫資料


改資料







二、然後是處理這個提交的php程式:

尋找


資料庫的資料


mysql_connect("localhost","使用者名稱","密碼") or die("無法聯結資料庫!");
$query="insert into $jpg values ('$id','$url','$mess','$fromx','$url1','$mess1','$fromx1','$url2','$mess2','$fromx2','$url3','$mess3','$fromx3')" ;
$result=mysql_db_query("elong",$query); //執行寫入

if (mysql_affected_rows()==1)
{
echo "資料已加放資料庫 $jpg 中

";
echo "


























n n n n n n n n n n n n n n n n n n n n n n n n n n n
ID $id
url地址 $url
小圖 $mess
說明 $fromx
url地址1 $url1
小圖1 $mess1
說明1 $fromx1
url地址2 $url2
小圖2 $mess2
說明2 $fromx2
url地址3 $url3
小圖3 $mess3
說明3 $fromx3
n";
}
else echo "系統出了問題,請重試!:(";
mysql_close();
?>
回到首頁

http://www.bkjia.com/PHPjc/318033.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/318033.htmlTechArticle一、以下是資料庫的寫入的html程式,你可以加入密碼功能。把密碼做成變數發入下面那個寫入的php程式。這樣就實現了密碼保護了: html he...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.