Home > Backend Development > PHP Tutorial > PHP Desktop Center (3) Modify Database_PHP Tutorial

PHP Desktop Center (3) Modify Database_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:56:33
Original
1007 people have browsed it

The following program lists the data of that ID after you enter the ID.Then you can modify and write. (isset($id))
{
if(!mysql_connect("localhost","username","password"))
{echo "Unable to connect to the database";
exit() ;
}
if(isset($url))
{
$query="update $jpg set id='$id',url='$url',mess='$mess ',
fromx='$fromx',url1='$url1',mess1='$mess1',fromx1='$fromx1',url2='$url2',
mess2='$mess2', fromx2='$fromx2',url3='$url3',mess3='$mess3',fromx3='$fromx3'
where id='$id'" ;
$result=mysql_db_query("elong" ,$query); //Perform writing
if (!$result)
{echo "An error occurred!";
exit();
}
echo "$id has been updated !

";
echo "

n
n
n
n
n
n
n
n
n
n
n ;Description 1n 🎜>

n ;n
n
n
ID$id
url address$url
Small image$messn
Description$fromx
url address 1n
Picture 1$mess1
$fromx1
n ;tr>n
url address 3$url3
Instruction 3$fromx3
n";
echo "Back to homepage";
exit();
}
$query="SELECT id,url,mess,fromx,url1,mess1,fromx1, url2,mess2,fromx2,url3,mess3,fromx3 from $jpg
where id='$id'" ;
$result=mysql_db_query("elong",$query);
if (!$result )
{echo "An error occurred!";
exit();

$r=mysql_fetch_array($result); 
$id = $r["id"]; 
$url = $r["url"]; 
$mess = $r["mess"]; 
$fromx = $r["fromx"]; 
$url1 = $r["url1"]; 
$mess1 = $r["mess1"]; 
$fromx1 = $r["fromx1"]; 
$url2 = $r["url2"]; 
$mess2 = $r["mess2"]; 
$fromx2 = $r["fromx2"]; 
$url3 = $r["url3"]; 
$mess3 = $r["mess3"]; 
$fromx3 = $r["fromx3"]; 
echo" 






























ID: 
类形: 
图片url地址: 
说明: 
来自: 
图片url地址: 
说明: 
来自: 
图片url地址: 
说明: 
来自: 
图片url地址: 
说明: 
来自: 


n"; 

else 
{?> 

请输放需要更改的id:

 
 

 
动漫桌布 
 
平分秋色水彩画 
 
明星写真 
 
广告创意 
 
其它类 
 

 
 
 
 
 
 
 

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318031.htmlTechArticleThe following program lists the data of that id after you enter the id. Then you can modify and write. html body h1 database data update/h1? if(isset($id)) { if(!mysql_conn...
source:php.cn
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template