谁能在第47行发现错误 [英] Can anyone spot the error here on line 47
本文介绍了谁能在第47行发现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在进行更新,并且在我的更新脚本中第47行遇到障碍,有一个错误,但无法发现它,一直在寻找它
也许第三只眼睛会看到我不能的,任何帮助都会非常感激。
我尝试了什么: < br $> b $ b
I am doing an update and i keep hitting a snag on line 47 in my update script, there is an error there but cannot spot it, been looking for it whole day
maybe a third eye will see what i cannot, any help will be much appreciated.
What I have tried:
<pre><?php
if(isset($_POST['edit']))
{
//Capture values from form and store in php variables
$title=$_POST['title'];
$fname=$_POST['fname'];
$address=$_POST['address'];
$sex=$_POST['gender'];
$hobbies=join(" ,", $_POST['hobby']);
$uname=$_POST['uname'];
$pword=$_POST['currentpword'];
include'db_config.php';
$sql = "SELECT uname,pword FROM member WHERE uname='$uname' AND pword=md5('$pword')";
if($result=mysqli_query($con,$sql))
{
$rowcount=mysqli_num_rows($result);
if($rowcount==1)
{
$sql="UPDATE member
SET title='$title', name='$fname', address='$address', sex='$sex', hobby='$hobby', uname='$uname',
WHERE pword=md5('$pword')";
if(mysqli_query($con,$sql))
{
mysqli_close($con);
echo "<script type=\"text/javascript\">
alert('your information has been updated $title $name');
window.location\view.php\";
</script>";
}
else
{
echo"<script type\"text/javascript\">
alert('error');
window.location/edit.php\";
</script>";
}
else<--- the arrow point to where the error is.
{
echo mysqli_error($con);
}
}
}
?>
推荐答案
_POST [' edit']))
{
// 从中捕获值在php变量中形成和存储
_POST['edit'])) { //Capture values from form and store in php variables
title =
_POST [' title'];
_POST['title'];
这篇关于谁能在第47行发现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文