mystisk fejl i </html> tag
jeg får den her fejl i linien med </body>Parse error: parse error in C:\wamp\www\cmsDbOgFiler\cms\opret.php on line 103
her er koden
linie 103 er </html>
<!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" />
<title>Untitled Document</title>
<?php
include'../includes/dbConnect.php';
?>
</head>
<body>
<?php
include 'picfunc.php';
if(isset($_POST['ok'])){
$varPic = @$_POST['picfile'];
echo $image_path = "images/$varPic"; //Path of the image file
$image_path_new = "images/temp_$varPic"; //Path of the new image file
$image = open_image($image_path); //Open the image
# Check if image can be opened
if ($image === false){
# Image can not be opened
echo "File is not a valid image";
}else{
# Original file size
$width = imagesx($image);
$height = imagesy($image);
# New file size
$width_new = 150;
$height_new = $height * ($width_new / $width);
# Resize / resample the image
$image_resized = imagecreatetruecolor($width_new, $height_new);
imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $width_new,
$height_new, $width, $height);
# Check if the image have been resized
if (!isset($image_resized)){
$image_resized = $image;
};
# Save the image
imagejpeg($image_resized, $image_path_new);
# Display resized image
echo "New image:<br /><img src=\"".$image_path_new."\"><br /><br />";
# Display original image
echo "Original image:<br /><img src=\"".$image_path."\">";
$ovs = addslashes($_POST['ovs']);
$txt = addslashes($_POST['txt']);
$menu = addslashes($_POST['menu']);
$thumb = addslashes($_POST['thumb']);
$pic = addslashes($_POST['pic']);
mysqli_query($conn,"INSERT INTO news (NHead,NBody,pmenu, thumb, pic) VALUES ('".$ovs."','".$txt."','".$menu."', '".$thumb."', '".$pic."')");
header('location:index.php?mid='.$menu); //. = & dvs. vi fanger variablen med '.$menu.'
};
?>
<form method="post" action="opret.php" name="opret">
<fieldset>
<legend>Opret her</legend>
<table>
<tr>
<td>Overskrift:</td><td> <input type="text" name="ovs" /></td>
</tr>
<tr>
<td>Menu:</td><td> <input type="text" name="menu" /></td>
</tr>
<tr>
<td>Indhold: </td><td><textarea name="txt" style="width:200px;height:200px;"></textarea></td>
</tr>
<tr>
<td>Billede: </td><td><input type=file name="picfile" size="20" /> </td>
</tr>
<tr>
<td></td><td><input type="submit" name="ok" value="opret" /></td>
</table>
</fieldset>
</form>
</body>
</html>