无为清净楼资源网 Design By www.qnjia.com
来源:奥索网
桌面中心(三)修改数据库
作者:elong
下面这个程序在你输入id后就把那个id的数据列出来。然后你就可以修改后写入了.
<html>
<body>
<h1>数据库的数据更新</h1>
<?
if(isset($id))
{
if(!mysql_connect("localhost","用户名","密码"))
{echo"无法联接数据库";
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); //执行写入
if (!$result)
{echo "发生错误!";
exit();
}
echo "$id 已经更新!
";
echo "<table>n
<tr>n
<td>ID<td>$id</tr>n
<tr>n
<td>url地址<td>$url</tr>n
<tr>n
<td>小图<td>$mess</tr>n
<tr>n
<td>说明<td>$fromx</tr>n
<tr>n
<td>url地址1<td>$url1</tr>n
<tr>n
<td>小图1<td>$mess1</tr>n
<tr>n
<td>说明1<td>$fromx1</tr>n
<tr>n
<td>url地址2<td>$url2</tr>n
<tr>n
<td>小图2<td>$mess2</tr>n
<tr>n
<td>说明2<td>$fromx2</tr>n
<tr>n
<td>url地址3<td>$url3</tr>n
<tr>n
<td>小图3<td>$mess3</tr>n
<tr>n
<td>说明3<td>$fromx3</tr>n
</table>n";
echo "<a href='set.htm'>回到首页</a>";
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 "发生错误!";
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"
<form action='ww.php' method='post'>n
<table>n
<tr>n
<td>ID:<td> <input type=text name='id' value='$id'></tr>n
<tr>n
<td>类形:<td> <input type=text name='jpg' value='$jpg'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url' size='100' value='$url'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess' size='100' value='$mess'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx' size='100' value='$fromx'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url1' size='100' value='$url1'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess1' size='100' value='$mess1'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx1' size='100' value='$fromx1'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url2' size='100' value='$url2'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess2' size='100' value='$mess2'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx2' size='100' value='$fromx2'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url3' size='100' value='$url3'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess3' size='100' value='$mess3'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx3' size='100' value='$fromx3'></tr>n
</table>n
<input type=submit value='更新'>n
</form>n";
}
else
{?>
<h3>请输放需要更改的id:</h3>
<center><form action='ww.php' method='post'>
动漫桌布
<input type="radio" name="jpg" value="jpg" checked>
平分秋色水彩画
<input type="radio" name="jpg" value="jpg1">
明星写真
<input type="radio" name="jpg" value="jpg2">
广告创意
<input type="radio" name="jpg" value="jpg3">
其它类
<input type="radio" name="jpg" value="jpg4">
<input type=text name='id'>
<input type=submit value='查询'>
</form></center>
<?}?>
</body>
</html>
桌面中心(三)修改数据库
作者:elong
下面这个程序在你输入id后就把那个id的数据列出来。然后你就可以修改后写入了.
<html>
<body>
<h1>数据库的数据更新</h1>
<?
if(isset($id))
{
if(!mysql_connect("localhost","用户名","密码"))
{echo"无法联接数据库";
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); //执行写入
if (!$result)
{echo "发生错误!";
exit();
}
echo "$id 已经更新!
";
echo "<table>n
<tr>n
<td>ID<td>$id</tr>n
<tr>n
<td>url地址<td>$url</tr>n
<tr>n
<td>小图<td>$mess</tr>n
<tr>n
<td>说明<td>$fromx</tr>n
<tr>n
<td>url地址1<td>$url1</tr>n
<tr>n
<td>小图1<td>$mess1</tr>n
<tr>n
<td>说明1<td>$fromx1</tr>n
<tr>n
<td>url地址2<td>$url2</tr>n
<tr>n
<td>小图2<td>$mess2</tr>n
<tr>n
<td>说明2<td>$fromx2</tr>n
<tr>n
<td>url地址3<td>$url3</tr>n
<tr>n
<td>小图3<td>$mess3</tr>n
<tr>n
<td>说明3<td>$fromx3</tr>n
</table>n";
echo "<a href='set.htm'>回到首页</a>";
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 "发生错误!";
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"
<form action='ww.php' method='post'>n
<table>n
<tr>n
<td>ID:<td> <input type=text name='id' value='$id'></tr>n
<tr>n
<td>类形:<td> <input type=text name='jpg' value='$jpg'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url' size='100' value='$url'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess' size='100' value='$mess'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx' size='100' value='$fromx'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url1' size='100' value='$url1'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess1' size='100' value='$mess1'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx1' size='100' value='$fromx1'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url2' size='100' value='$url2'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess2' size='100' value='$mess2'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx2' size='100' value='$fromx2'></tr>n
<tr>n
<td>图片url地址:<td> <input type=text name='url3' size='100' value='$url3'></tr>n
<tr>n
<td>说明:<td> <input type=text name='mess3' size='100' value='$mess3'></tr>n
<tr>n
<td>来自:<td> <input type=text name='fromx3' size='100' value='$fromx3'></tr>n
</table>n
<input type=submit value='更新'>n
</form>n";
}
else
{?>
<h3>请输放需要更改的id:</h3>
<center><form action='ww.php' method='post'>
动漫桌布
<input type="radio" name="jpg" value="jpg" checked>
平分秋色水彩画
<input type="radio" name="jpg" value="jpg1">
明星写真
<input type="radio" name="jpg" value="jpg2">
广告创意
<input type="radio" name="jpg" value="jpg3">
其它类
<input type="radio" name="jpg" value="jpg4">
<input type=text name='id'>
<input type=submit value='查询'>
</form></center>
<?}?>
</body>
</html>
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
更新日志
2024年11月15日
2024年11月15日
- 群星.2002-恋爱物语情歌对唱精选2CD(引进版)【滚石】【WAV+CUE】
- 群星《闽南情24K德国HD金碟》2CD[WAV+CUE]
- 周传雄《恋人创世纪》环球唱片[WAV+CUE]
- 关淑怡-《真假情话K2HD》(日本压制)【WAV+CUE】
- 王菲 -《Faye Wong》雨果LPCD45 [WAV+分轨][1G]
- 陈百强《世纪10星·永恒篇》环球[WAV+CUE][1G]
- 陈奕迅《黑·白·灰》台湾版[WAV+CUE][400M]
- 张尕怂.2024-甘肃娃娃【FLAC分轨】
- 张惠妹.2011-A.MEI.ACOUSTIC.BEST.2CD【丰华】【WAV+CUE】
- ZEN.1996-珍惜所有【华纳】【WAV+CUE】
- 群星《环球国语元素》香港首版[WAV+CUE][1G]
- 周慧敏《玉女天后》原音母版1:1直刻[WAV+CUE][1G]
- 谭咏麟《20世纪中华歌坛名人百集珍藏版》[WAV+CUE][1G]
- 炉石传说40轮盘术最新卡组代码在哪找 标准40轮盘术卡组代码分享
- 炉石传说亲王贼怎么玩 2024亲王贼最新卡组代码分享