Hi,
Can someone help me out with these errors please:
Line 3 column 31: document type does not allow element “script” here.
<script type=“text/javascript” >
Line 7 column 9: no document element.
</script**>**
Is there anything wrong with the doctype?
<?php /*
Addphoto.php - This page ....
PHP written ....,
PHP modified ...
Transfered into design by Timothy Willis
*/
//looks for a cookie. If cookie doesn't exist, block the user and send them to nocookie.php. This ensures annonomous users cannot upload an image.
require_once('albumdb.php');
$id = $_COOKIE['member'];
$dbQuery = "SELECT * ";
$dbQuery .= "FROM member";
$result = mysql_query($dbQuery) or die("Couldn't get file list");
while($record = mysql_fetch_array($result)) {
if ($record['memberId'] == $id) {
$name = $record['userName'];
} // if
}
if ($id < '0') {
?>
<script type="text/javascript" >
<!--
window.location="nocookie.php";
//-->
</script>
<?php
} else {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)">
<html xmlns="[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>| Upload an Image</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" >
<!--
function emptyvalidation(entered, alertbox)
{
with (entered)
{
if (value==null || value=="")
{if (alertbox!="") {alert(alertbox);} return false;}
else {return true;}
}
}
function formvalidation(thisform)
{
with (thisform)
{
if (emptyvalidation(title,"You have not entered a title")==false) {title.focus(); return false;};
if (emptyvalidation(imageFile,"You did not enter a location of an image")==false) {imageFile.focus(); return false;};
if (emptyvalidation(description,"You have not entered a description")==false) {description.focus(); return false;};
}
}
//-->
</script>
</head>
<body id="contact">
<div id="container">
<div id="header">
<h1><a href="../" title="Flickr baby"><span>image<strong>galler</strong></span></a></h1>
</div>
<div id="header-print">
</div>
<div id="navigation">
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="login.php" class="selected">Member</a></li>
<li><a href="gallery.php">Explore</a></li>
<li><a href="support.htm">Support</a></li>
<li>
<div align="center">
<?php
//output who (if they are) logged in as (looks up from cookie)
$id = $_COOKIE['member'];
$dbQuery = "SELECT * ";
$dbQuery .= "FROM member";
$result = mysql_query($dbQuery) or die("Couldn't get file list");
while($record = mysql_fetch_array($result)) {
if ($record['memberId'] == $id) {
$name = $record['userName'];
} // if
}
if ($id < '0') {
?>
You are not currently signed in
<?php
} else {
echo "You are currently logged in as $name " ;
}
?>
</li>
</ul>
</div>
<div id="content-main">
<h3>Please <span class="txt">upload an image</span> Below</h3>
<p>Notes: <br />
<span class="form-required">- *</span> indicates a required field.<br />
<span class="form-required">-- Tags</span> are optional but we recomend inserting up to 5 tags to help yourself and others find your images.
</p>
<form action=uploadphoto.php method=post enctype="multipart/form-data" form onSubmit="return formvalidation(this)">
<label for="title">Title <span class="form-required">*</span></label><br />
<input id="title" name="title" type="text" value=""<?php if(isset($title)) print($title); ?>"" /><br />
<label for="imageFile">Upload <span class="form-required">*</span></label><br />
<input id="imageFile" type="file" name="imageFile" type="text" value="" /><br />
<label for="description">Description <span class="form-required">*</span></label><br />
<input id="description" name="description" type="text" value="<?php if(isset($description)) print($description); ?>" /><br />
<br />
(Click <a href="#" onClick="MyWindow=window.open('tags.php','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=450'); return false;">here</a> to view list of tags being used,<br /> however, you can enter a new tag) <br />
<label for="tagWord">Tag 1 <span class="form-required"></span></label><br />
<input id="tagWord" name="tagWord" type="text" value="" /><br />
<label for="tagWord2">Tag 2 <span class="form-required"></span></label><br />
<input id="tagWord2" name="tagWord2" type="text" value="" /><br />
<label for="tagWord3">Tag 3 <span class="form-required"></span></label><br />
<input id="tagWord3" name="tagWord3" type="text" value="" /><br />
<label for="tagWord4">Tag 4 <span class="form-required"></span></label><br />
<input id="tagWord4" name="tagWord4" type="text" value="" /><br />
<label for="tagWord5">Tag 5 <span class="form-required"></span></label><br />
<input id="tagWord5" name="tagWord5" type="text" value="" /><br />
<input id="upload" name="op" type="submit" value="Upload Photo" class="send" />
<br />
</form>
</div>
<div id="footer">
<p> </p>
<div id="footer-designers">
<p>Designed by T Willis <br />C Baines, P Williamson </p>
</div>
<div id="footer-uwe">
<p>University of the West of England<br />
</p>
</div>
<div id="footer-email">
<p> <br />e:
<script type="text/javascript">
<!--
var username = "enquiries";
var hostname = "blah.com";
var linktext = username + "@" + hostname;
document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + " title=" + linktext + ">" + linktext + "</a>");
//-->
</script>
</p>
</div>
<div id="footer-copyright">
<p>Image strong>Gallery</strong> <a href="signup.php">Sign Up </a> <a href="information.htm">About </a> <a href="contact.htm">Contact </a> <a href="[http://jigsaw.w3.org/css-validator/check/referer](http://jigsaw.w3.org/css-validator/check/referer)" target="_blank">Valid CSS</a> </p>
</div>
</div>
</div>
</body>
</html>
<?php
}
Thanks