来源:奥索网
桌面中心(二)数据库写入
作者:elong
一、以下是数据库的写入的html程序,你可以加入密码功能。把密码做成变量发入下面那个写入的php程序。这样就实现了密码保护了:
数据库 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
ID | $id |
n
n
url address | $url |
n
n
Small picture | $ mess |
n
n
Description | $fromx |
n
n
url address 1 | $url1 |
n
n
Picture 1 | $mess1 |
n
n
Description 1 | $fromx1 |
n
n
url address 2 | $url2 |
n
Picture 2 | $mess2 |
n
n
Description 2 | $fromx2 |
n
n
url address 3 | $url3 |
n
n
Picture 3 | $mess3< ;/tr>n
|
n
Note 3 | $fromx3 |
n
n";
}
else echo "There is a problem with the system, please try again!:(";
mysql_close();
?>
Back to homepage a>
http://www.bkjia.com/PHPjc/315237.htmlwww.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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn