Desktop Center (iii) modify Database _php Tutorial

Source: Internet
Author: User
The following program lists the data for that ID after you enter it. Then you can modify it and write it later.


Data updates for Databases


if (Isset ($id))
{
if (! MySQL (and PHP collocation best combination) _connect ("localhost", "username", "password")
{echo "Cannot join database";
Exit ();
}
if (Isset ($url))
{
$query = "Update $jpg set id= $id, url= $url, mess= $mess,
fromx= $fromx, url1= $url 1,mess1= $mess 1,fromx1= $fromx 1,url2= $url 2,
mess2= $mess 2,fromx2= $fromx 2,url3= $url 3,mess3= $mess 3,fromx3= $FROMX 3
where id= $id ";
$result =mysql (and PHP collocation of the best combination) _db_query ("elong", $query); Perform write

if (! $result)
{echo "error occurred!";
Exit ();
}
echo "$id has been updated!

";
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 ";
echo "Back Home";
Exit ();
}
$query = "Select Id,url,mess,fromx,url1,mess1,fromx1,url2,mess2,fromx2,url3,mess3,fromx3 from $jpg
where id= $id ";
$result =mysql (and PHP collocation of the best combination) _db_query ("elong", $query);
if (! $result)
{echo "error occurred!";
Exit ();
}
$r =mysql (the best combination with PHP) _fetch_array ($result);
$id = $r ["id"];
$url = $r ["url"];
$mess = $r ["mess"];
$FROMX = $r ["FromX"];
$url 1 = $r ["URL1"];
$mess 1 = $r ["Mess1"];
$FROMX 1 = $r ["Fromx1"];
$url 2 = $r ["Url2"];
$mess 2 = $r ["Mess2"];
$FROMX 2 = $r ["FROMX2"];
$url 3 = $r ["Url3"];
$mess 3 = $r ["MESS3"];
$FROMX 3 = $r ["Fromx3"];
Echo
N




















http://www.bkjia.com/PHPjc/509078.html www.bkjia.com true http://www.bkjia.com/PHPjc/509078.html techarticle The following program lists the data for that ID after you enter it. Then you can modify it and write it later. Data update/h1 for HTML body H1 database? if (Isset (ID)) if (! MySQL (and PHP ...

  • N N N N N N N N N N N N N N N N N N N N N
    Id:
    Class Shape:
    Image URL Address:
    Description
    From:
    Image URL Address:
    Description
    From:
    Image URL Address:
    Description

    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.