my fileassign script is just the the name of the script that i am having problems with
here is the first part
------------------------------------------------------------------------
<?
require("scripts/dbconfig.php");
require("scripts/adsec.php");
$uid=$_GET['uid'];
$userq=mysql_query("SELECT * FROM users WHERE uid='$uid'");
$firstname=mysql_result($userq,0,"firstname");
$lastname=mysql_result($userq,0,"lastname");
$email=mysql_result($userq,0,"email");
$memberq=mysql_query("SELECT * FROM memberships WHERE uid='$uid'");
$cid=mysql_result($memberq,0,"cid");
$compq=mysql_query("SELECT * FROM companies WHERE cid='$cid'");
$company=mysql_result($compq,0,"company");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>FTS: Field Technical Services</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else
return true;
}
// End -->
</script>
<style type="text/css">
<!--
.style3 {color: #999999}
-->
</style>
</head>
<style type="text/css" media="all">
@import "styles/default.css";
.style20 {color: #0000FF}
.style21 {color: #000000}
</style>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" rightmargin="0">
<div align="center">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60%" bgcolor="#FFFFFF" class="heading1"> </td>
<td width="40%" bgcolor="#FFFFFF" class="copyright"><div align="right"><font color="#666666">Home | About Us | Data Library | Contact Us </font></div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="372" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/bar.jpg" width="800" height="30"></td>
</tr>
<tr>
<td height="342" align="left" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="0pxpaddingborder">
<tr>
<td height="19" align="left" valign="top" background="images/bg.gif" bgcolor="#333333"><object classid="clsid
27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="798" height="90">
<param name="movie" value="flash/datalib.swf">
<param name="quality" value="high"><param name="LOOP" value="false">
<embed src="flash/datalib.swf" width="798" height="90" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object></td>
</tr>
<tr bgcolor="#CC0000">
<td height="19" bgcolor="#CC0000" class="heading2"> </td>
</tr>
<tr align="left" valign="top" bgcolor="#FFFFFF">
<td height="298">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="75%" height="297" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="5padd-head"><strong> Administration </strong></td>
</tr>
<tr>
<td colspan="2" class="5padd"><p align="left" class="style3"><strong>Company Details </strong></p>
</tr>
<tr>
<td colspan="2" valign="top" class="5padd-border1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="5padd"><strong>Company:</strong></td>
<td class="5padd"><? echo $company; ?></td>
</tr>
<tr>
<td width="11%" class="5padd"><div align="left"><strong>First Name:</strong></div></td>
<td width="89%" class="5padd"><? echo $firstname; ?> </td>
</tr>
<tr>
<td class="5padd"><div align="left"><strong>Last Name:</strong></div></td>
<td class="5padd"><? echo $lastname; ?> </td>
</tr>
<tr>
<td class="5padd"><div align="left"><strong>Email Address:</strong></div></td>
<td class="5padd style20"><? echo $email; ?> </td>
</tr>
</table>
<br></td>
</tr>
<tr>
<td width="52%" valign="top" class="5padd"><span class="style3"><strong>Select the files to assign to this user... </strong></span></td>
<td width="48%" valign="top" class="5padd"><div align="right" class="style20"></div></td>
</tr>
<tr>
<td colspan="2" valign="top" class="5padd"><form name="form1" method="post" action="<? echo"scripts/assignfiles(user)sc.php?uid=$uid"; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="lightborder">
<tr bgcolor="#666666">
<td colspan="4"> </td>
</tr>
<tr>
<td width="3%" class="5padd-border1"><div align="center">-</div></td>
<td width="46%" class="5padd-border1"><strong>File Name </strong><strong></strong></td>
<td width="30%" class="5padd-border1"><div align="left"><strong>Last Updated </strong></div></td>
<td width="21%" class="5padd-border1"><div align="right"><strong>File Size </strong></div></td>
</tr>
<?
$fileq=mysql_query("SELECT * FROM files");
$fileqnum=mysql_num_rows($fileq);
$f=0;
if($fileqnum < 1){
echo"<tr bgcolor='#EEEEEE'><td class='5padd-border1' colspan='5'>There are no files in the database.</td></tr>";
}
while($f < $fileqnum){
$filename=mysql_result($fileq,$f,"filename");
$filesize=mysql_result($fileq,$f,"filesize");
$lastupdated=mysql_result($fileq,$f,"lastupdated");
$fid=mysql_result($fileq,$f,"fid");
$unixtime=mysql_result($fileq,$f,"unixtime");
if($lastupdated==0){ $lastupdated=$unixtime; }
$lastupdated=date("m/d/Y",$unixtime);
echo"<tr bgcolor='#EEEEEE'>
<td class='5padd-border1'><div align='center'>";
$qq=mysql_query("SELECT * FROM fileassign WHERE uid='$uid' AND fid='$fid'");
$qqnum=mysql_num_rows($qq);
if($qqnum < 1){
echo"<input type='checkbox' name='files[]' value='$fid'></div></td>";
}else{
echo"-</div></td>";
}
echo"<td class='5padd-border1'>$filename</td>
<td class='5padd-border1'><div align='left'>$lastupdated</div></td>
<td class='5padd-border1'><div align='right'>$filesize Bytes</div></td>
</tr>";
$f++;
}
?>
</table>
<p align="right">
<input type="submit" name="Submit" value="Assign Selected Files" class="TextField">
</p>
<p> </p>
</form>
<p> </p></td>
</tr>
</table></td>
<td width="25%" align="left" valign="top" bgcolor="#EFEEC7" class="leftborder">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="loginborder">
<tr>
<td height="170" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#EFEEC7">
<tr>
<td valign="top" class="copyright"><strong>Logged in as: </strong><span class="style3">Administrator</span></td>
</tr>
</table><? require("adminnav.php"); ?>
</td>
</tr>
</table>
<div align="center"><br>
</div></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/grad3.gif" width="800" height="20"></td>
</tr>
<tr>
<td class="copyright2">©Copyright 2006 Fts.<br>
This site was created by <u>Masterpiece Computers</u></td>
</tr>
</table>
</div>
</body>
</html>
------------------------------------------------------------------------
and here is the supporting script
------------------------------------------------------------------------
<?php require("dbconfig.php");
$uid=$_GET['uid'];
$time=time();
$files[]=$_GET['files'];
foreach($files as $file){
if($file <= ""){
}else{
$q1=mysql_query("SELECT lastupdated FROM files WHERE fid='$file'");
$filetime=mysql_result($q1,0,"lastupdated");
$q=mysql_query("INSERT INTO fileassign VALUES('0','$file','$uid','0','$filetime')") or die("could not create file membership");
}
}
echo "<meta http-equiv='REFRESH' content='0;url=../userdetails.php?uid=$uid'></HEAD>";
?>
-----------------------------------------------------------------------
i would go to i guy who made it but i can not find him
thank you to all that have helped just let me know if you need and more info
i have very little understanding of PHP so this makes it even more frustrating