Desktop Center (2) database writing

Source: Internet
Author: User
Source: Oracle Internet desktop Center (2) database writing author: elong 1. The following is the database writing html program. you can add the password function. Make the password into a variable and send it to the following written php program (as the mainstream development language. In this way, password protection is implemented: & lt; html & gt; & lt; head & gt; & lt; SyntaxHigh Source: Aesop

Desktop Center (2) database writing
Author: elong

1. The following is the html program written into the database. you can add the password function. Make the password into a variable and send it to the following written php program (as the mainstream development language. In this way, password protection is implemented:


Database






Database management program



(Best combination with PHP). php (as the mainstream development language) "> View database information


(As the current mainstream development language) "> Change Materials







2. the php program that handles the submission (as the mainstream development language) is as follows:

Search


Database data
MySQL (the best combination with PHP) _ connect ("localhost", "username", "password") or die ("cannot connect to the database! ");
$ Query = "insert into $ jpg values ('$ ID',' $ url', '$ mess', '$ fromx', '$ url1',' $ mess1 ', '$ fromx1', '$ url2', '$ mess2', '$ fromx2', '$ url3', '$ mess3',' $ fromx3 ')";
$ Result = MySQL (the best combination with PHP) _ db_query ("elong", $ query); // execute write

If (MySQL (the best combination with PHP) _ affected_rows () = 1)
{
Echo "the data has been added to the database $ jpg

";
Echo"














N N N N N N N N N N N N N N N N
ID $ Id
Url $ Url
Thumbnail $ Mess
Description $ Fromx
Url address 1 $ Url1
Small $ Mess1
Description 1 $ Fromx1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.