It gives me another error message
Parse error: parse error, unexpected '}' in C:\Program Files\Apache Group\Apache2\htdocs\fmp\index.php on line 139
below is my code
<?php
if($_POST["Submit"]) {
$name = addslashes($POST['name']);
$email = addslashes($POST['surname']);
$room = addslashes($POST['room']);
$computers= addslashes($POST['computers']);
$description = addslashes($_POST['description']);
$db = @mysql_connect('localhost', 'phpuser', 'phpuser03') or die('Could not connect to the database: '.mysql_error());
@mysql_select_db('helpdesk') or die('Could not select the database: '.mysql_error());
$result = mysql_query('INSERT INTO requests_table (name, email, room, computers, description, date_time)'.
"VALUES ('$name', '$email', '$room', '$computers', '$description')") or die('Unable to insert record. '.mysql_error());
Echo "Your record was successfully inserted";
} else { ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
</head>
<body>
<h1 align="left"><span class="style1">Technical Services, Help Desk </span></h1>
<form name="form1" method="post" action="<? $PHP_SELF ?>">
<table width="767" border="0">
<tr>
<th scope="row"> </th>
<td class="style1">All fields are required.</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td class="style1"> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th width="21" scope="row"> </th>
<td width="151" class="style1">Name </td>
<td width="368"><input name="name" type="text" id="name"></td>
<td width="65"> </td>
<td width="65"> </td>
<td width="71"> </td>
</tr>
<tr>
<th scope="row"> </th>
<td class="style1">Email</td>
<td><input name="email" type="text" id="email"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td class="style1">Room</td>
<td><input name="room" type="text" id="room" size="5"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td class="style1">computers(s)</td>
<td><input name="computers" type="text" id="computers"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td class="style1">Description of request </td>
<td><textarea name="description" cols="50" rows="5" id="description"></textarea></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td><input name="Submit" type="submit" onClick="MM_validateForm('name','','R','email','','NisEmail','room','','R','computers','','R','description','','R');return document.MM_returnValue" value="Submit">
</td>
<?php
if($_POST["submit"]) {Submit}
?>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th height="21" scope="row"> </th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p align="center"> </p>
<p align="center"> </p>
</form>
<p> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<? } ?>
</body>
</html>