Hi Sorry,
Will try that once I get home, i wasn't getting any error messages.
Just a blank page. The funny thing was i created a simple hellworld.php and called it from root and it worked, but none of my other files work, although i know they work becuase they worked in my previous version of php 4.3.4. I then proceeded to add the line echo" hello"; to one of the files that wasnt working
and it displayed it, tyen i moved that line just after my require statement at the top of the page and it stopped working, yet there is nothing wrong with my statement.
here is the code for that file
<?php
require('dbconnect.php');
if($_POST['Submit']) {
$name = addslashes($POST['name']);
$email = addslashes($POST['email']);
$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)'.
"VALUES ('$name', '$email', '$room', '$computers', '$description', NOW())") or die('Unable to insert record. '.mysql_error());
Echo "Your form was successfully submitted ";
echo '<br /><br />Please click <a href="http://www.imranali.homeunix.com/fmp' , $url , '">here</a> to go back to submit another request';
} 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_valida
teForm.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"> </span></h1>
<form name="form1" method="post" action="<? $PHP_SELF ?>">
<table width="767" border="0">
<tr>
<th scope="row"> </th>
<td colspan="5" class="style1"><h1>Technical Services, Help Desk </h1></td>
</tr>
<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" maxlength="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" size="5" maxlength="5"></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="45" rows="3" id="description"></textarea></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>
<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 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>