Desktop Center (ii) database write _php tutorial

Source: Internet
Author: User
Tags password protection
Source: House Orso near Network

Desktop Center (ii) database write
Author: elong

One, the following is the database write HTML program, you can join the password function. Send the password into a variable that is written in the following PHP program. This allows for password protection:


<title>Database</title>






Database management Program



View Database Data


Change information







Second, then the PHP program that handles this submission:

<title>Find</title>


Data for the database


mysql_connect ("localhost", "username", "password") or Die ("Cannot join database!");
$query = "INSERT into $jpg values (' $id ', ' $url ', ' $mess ', ' $fromx ', ' $url 1 ', ' $mess 1 ', ' $FROMX 1 ', ' $url 2 ', ' $mess 2 ', ' $ Fromx2 ', ' $url 3 ', ' $mess 3 ', ' $fromx 3 ');
$result =mysql_db_query ("elong", $query); Perform write

if (Mysql_affected_rows () ==1)
{
echo "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 N N N N N N N N N N N
Id $id
URL address $url
Small map $mess
Description $fromx
URL Address 1 $url 1
Small Figure 1 $mess 1
Description 1 $FROMX 1
URL Address 2 $url 2
Small Figure 2 $mess 2
Description 2 $FROMX 2
URL Address 3 $url 3
Small Figure 3 $mess 3
Description 3 $FROMX 3
n ";
}
else echo "The system is out of the question, please try again!:(";
Mysql_close ();
?>
Back to Home



http://www.bkjia.com/PHPjc/315237.html www.bkjia.com true http://www.bkjia.com/PHPjc/315237.html techarticle Source: House Orso near Web Desktop Center (ii) database writer: elong The following is a database write HTML program, you can add the password function. Send the password into a variable to the following ...

  • 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.