im getting these errors Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in C:\xampps\htdocs\skyline\admin\other.php on line 36 and
Notice: Undefined variable: update in C:\xampps\htdocs\skyline\admin\other.php on line 67
<?php
$hostname = "localhost";
$dbname = "pricelist";
$username = "root";
$password = "";
$conn = new MySQLi($hostname, $username, $password, $dbname) or die('Can not connect to database')
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<otype></otype>
</head>
<body>
<?php
if(isset($_POST['Submit'])){
$oname = $_POST['updateoname'];
$otype = $_POST['updateotype'];
$ocost = $_POST['updateocost'];
$onotes = $_POST['updateonotes'];
$update = "UPDATE other SET oname='$oname', otype='$otype', ocost='$ocost', onotes='$onotes' WHERE id = ".$id;
$conn->query($update) or die("Cannot update");
}
?>
<?php
$sql = "SELECT * FROM other ";
$result = $conn->query($sql) or die(mysql_error());
$query=getenv(QUERY_STRING);
parse_str($query);
?>
<h2>Update Record </h2>
<form action="" method="post">
<?php
while ($row = $result->fetch_assoc()) {?>
<table border="0" cellspacing="10">
<tr>
<td>otype:</td> <td><input type="text" name="updateotype" value="<?php echo $row['otype']; ?>"></td>
</tr>
<tr>
<td>ocost:</td> <td><input type="text" name="updateocost" value="<?php echo $row['ocost']; ?>"></td>
</tr>
<tr>
<td>name:</td> <td><input type="text" name="updateoname" value="<?php echo $row['oname']; ?>"></td>
</tr>
<tr>
<td>onotes URL:</td> <td><input type="text" name="updateonotes" size="100" value="<?php echo $row['onotes']; ?>"></td>
</tr>
<tr>
<td><INPUT TYPE="Submit" VALUE="Update the Record" NAME="Submit"></td>
</tr>
</table>
<?php }
?>
</form>
<?php
if($update){
echo "<b>Update successful!</b>";
}
?>
</body>
</html>