Unexpected while nothing is wrong?
if(isset($_SESSION['adminbra']) && $_SESSION['adminbra'] == TRUE){
if($_SERVER['REQUEST_METHOD'] == "POST"){
$updtqry = "UPDATE bra
SET
bugtitle = '". mysql_real_escape_string($_POST['bugtitle']) ."',
status = '". mysql_real_escape_string($_POST['bugstatus']) ."',
bugdetails = '". mysql_real_escape_string($_POST['bugdetails'] ."'
WHERE
bugid = '". $_SESSION['braupdid'] ."'
"; // Row 166
if(!$res = mysql_query($updtqry))
{
echo 'Mysql error! Contact webmaster ASAP!<br/>';
}
elseif(mysql_affected_rows() == 0)
{
echo 'No updates where made!<br/>';
}
else
{
echo 'Updated.<br/>';
}
}
else
{
if(isset($_GET['id']) && is_numeric($_GET['id'])){
$qry1 = "SELECT *
FROM bra
WHERE bugid = '". $_GET['id'] ."'
";
$mysqlqry1 = mysql_query($qry1);
if($mysqlqry1){
if(mysql_num_rows($mysqlqry1) > 0){
while($row1 = mysql_fetch_assoc($mysqlqry1)){
$_SESSION['braupdid'] = $row1['bugid'];
echo '<form action="bra.php?action=editbug" method="post">';
echo 'Bug title: <input type="text" name="bugtitle" value="'. $row1['bugtitle'] .'"/><br/>';
echo 'Bug status: <select name="bugstatus">';
echo '<option value="0">Not fixed</option>';
echo '<option value="1">Fixed</option>';
echo '<option value="2">Nofix</option>';
echo '</select><br/>';
echo 'Details: <br/>';
echo '<textarea cols="50" rows="5" name="bugdetails">'. $row1['bugdetails'] .'</textarea>';
echo '<input type="submit" value="submit"/>';
}
}
else
{
echo 'Invalid bug id.<br/>';
}
}
else
{
echo 'Mysql query failed! Contact webmaster ASAP!<br/>';
}
}
else
{
echo 'Please provide a valid bug id.<br/>';
}
}
}
else
{
echo '<a h开发者_高级运维ref="bra.php?action=adminlogin">Login</a> first.<br/>';
}
Hello again stackoverflow...
I get in this code an error: Parse error: syntax error, unexpected ';' in C:\data\home\EasyPHP5.2.10\www\BRA - Bug Report Admin\bra.php on line 166
But where is the problem? Row 166 is right after $updtqry.
mysql_real_escape_string($_POST['bugdetails']
is missing a )
.
精彩评论