$sql="update wp_prli_links set url='?' where id = $id ";这样不行就换种方式嘛,$url="?";
为福鼎等地区用户提供了全套网页设计制作服务,及福鼎网站建设行业解决方案。主营业务为成都网站制作、网站设计、福鼎网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!
$sql="update wp_prli_links set url='".$url."' where id = $id ";
修改如下:不用使用session传递
1.php 文件中: 修改后的代码,将$row["id"]作为id的参数值传递到2.php
else{
echo 'td'.'a href="2.php?id='.$row["id"].'"'.$row["id"].可以修改.'/a/td';
}
2.php修改如下:
$strSql="SELECT * from test where id=".$_GET['id'];
$str_sql="Select count(*) cnt From CompanyInfo Where CompanyID'$m_company_id' And CompanyName='$m_company_name', Status='$m_status'";//这里的",status='$m_status'"语句对?应该把‘,’改成and吧,我再mysql里运行这个语句是有语法错误的
检查下你的post变量是否有值,你一步步echo下试试吧。
update语句测试没有错误。虽然Status='$m_status '这里多了个空格
?php
$con = mysql_connect("localhost:3306","root","");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test", $con);
$result = mysql_query("SELECT * FROM user");
echo "table border='1'
tr
thUsername/th
thPassword/th
/tr";
while($row = mysql_fetch_array($result)) {
echo "tr";
echo "td" . $row['username'] . "/td";
echo "td" . $row['password'] . "/td";
echo "/tr";
}
echo "/table";
mysql_close($con);
?
从服务器中获取用户所有信息(SQL SELECT语句)并以表格形式出现
?php
$con = mysql_connect("localhost","root","");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test", $con);
mysql_query("DELETE FROM user WHERE username = '$_POST[username]'");
mysql_close($con);
?
删除该用户所有信息delete.php
?php
$con = mysql_connect("localhost:3306","root","");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test", $con);
$sql = "INSERT INTO user (username,password)
VALUES
('$_POST[username]','$_POST[password]')";
if (!mysql_query($sql,$con)) {
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con);
?
注册一个新用户insert.php
?php
$con = mysql_connect("localhost","root","");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("test", $con);
mysql_query("UPDATE user SET password = '$_POST[password]' WHERE username = '$_POST[username]'");
mysql_close($con);
?
修改一个用户密码update.php
html
head
titleFORM/title
/head
body
br /
h1Insert:/h1
form action="insert.php" method="post"
username:input type="name" name="username"/
br /
password:input type="password" name="password"/
input type="submit" value="submit"/
/form
br /hr /br /
h1Delete/h1
form action="delete.php" method="post"
username:input type="name" name="username" /
br /
Are you sure?input type="submit" value="sure" /
/form
br /hr /br /
h1Update/h1
form action="update.php" method="post"
username:input type="name" name="username"/
br /
You want to change your password into:input type="password" name="password"/
input type="submit" value="submit"/
/form
br /hr /br /
/body
/html
以上三个功能的提交源Operate.html
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款