Home  >  Article  >  Backend Development  >  Desktop Center (2) Database Writing_PHP Tutorial

Desktop Center (2) Database Writing_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 16:07:10790browse

来源:奥索网

桌面中心(二)数据库写入
作者:elong

一、以下是数据库的写入的html程序,你可以加入密码功能。把密码做成变量发入下面那个写入的php程序。这样就实现了密码保护了:


数据库






数据库管理程序



查看数据库资料


改资料



图片url地址





图片小图





说明


图片url地址1





图片小图1





说明1


图片url地址2





图片小图2





说明2


图片url地址3





图片小图3





说明3





平分秋色水彩画



明星写真



动漫桌布



广告创意



其它类














Second, the php program that handles this submission:

< title>Search


Database data


mysql_connect(" localhost","username","password") or die("Unable to connect to database!");
$query="insert into $jpg values ​​('$id','$url','$mess' ,'$fromx','$url1','$mess1','$fromx1','$url2','$mess2','$fromx2','$url3','$mess3','$fromx3' )" ;
$result=mysql_db_query("elong",$query); //Perform writing

if (mysql_affected_rows()==1)
{
echo "Data has been Add database $jpg in

";
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
ID$id
url address$url
Small picture$ mess
Description$fromx
url address 1$url1
Picture 1$mess1
Description 1$fromx1
url address 2$url2
Picture 2$mess2
Description 2$fromx2
url address 3$url3
Picture 3$mess3< ;/tr>n
Note 3$fromx3
n";
}
else echo "There is a problem with the system, please try again!:(";
mysql_close();
?>
Back to homepage



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/315237.htmlTechArticleSource: Aosuo.com Desktop Center (2) Database Writing Author: elong 1. The following is the writing of the database HTML program, you can add password function. Make the password a variable and send it to the one below...