Hi,
thanks. i have attached the html file (as a txt file. rename it betaform.html) and the php file is pasted in below. if you could test it for me it would be greatly appreciated. i haven't tried different browsers but like i said it works through my browser here at home but using the same browser doesn't work on the isp's servers. i'm convinced it's a server problem!!!
anyway, there are 2 pages. one called betaform.html (attached) and one betaform.php which is the actual script (pasted below).
you'll need to change the $filedir variable at the top of betaform.php to the relevant directory on your system.
thanks again for doing this for me as i am very rapidly running out of hair to pull!!!
look forward to your reply,
tom.
<-- start of betaform.php -->
<?php
import_request_variables('p', 'p_');
$pagelayout ="<body bgcolor=\"#FF6600\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" text=\"#000000\" link=\"#FFFFFF\" vlink=\"#336699\" alink=\"#FFFFFF\">";
$pagelayout.="<font face=\"Comic Sans MS, Arial, Helvetica, Verdana\" size=\"-1\" color=\"#000000\">";
$pagelayout.="<img src=\"images/header.gif\" width=\"400\" height=\"93\"><br><br>";
$subject = "CV Form Submission From www.thebuzzuk.com";
$filedir = "/websites/1102/woodwo8d/public_html/files";
$maxfile = "512000";
$nof = "1";
for ($i = 0; $i < $nof; $i++)
{
$userfile_name = $_FILES['userfile']['name'][$i];
$userfile_tmp = $_FILES['userfile']['tmp_name'][$i];
$userfile_size = $_FILES['userfile']['size'][$i];
$userfile_type = $_FILES['userfile']['type'][$i];
$userfile_path = "$filedir/$userfile_name";
//checks if file exists
if ($userfile_name == "") {
$isfile = "0";
} else {
$isfile = "1";
}
if ($userfile_name[$i] != "") {
if ($userfile_size > $maxfile) {
echo "$pagelayout";
echo "This file is too big for uploading. It is $userfile_size bytes and there is a limit of $maxfile bytes.<br>";
echo "Please click <a href=\"javascript:history.back(1)\">here</a> to go back and upload a smaller file.";
echo "</font></body>";
exit;
}
// upload file
$location = "$filedir/$userfile_name";
move_uploaded_file($userfile_tmp, $location);
// end of file upload
}
// end loop
}
?>
<html>
<head>
<title>Thank You</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FF6600" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" text="#000000" link="#FFFFFF" vlink="#336699" alink="#FFFFFF">
<table width="400" border="0" cellspacing="0" cellpadding="0" height="400">
<tr>
<td><img src="images/header.gif" width="400" height="93"></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><object classid="clsid😃27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#3,0,0,0" width="400" height="40">
<param name="SRC" value="flash/titles/whoAreYou.swf">
<embed src="flash/titles/whoAreYou.swf" pluginspage="http://www.macromedia.com/shockwave/download/" type="application/x-shockwave-flash" width="400" height="40">
</embed>
</object></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="53"><font face="Arial, Helvetica, sans-serif" size="-1">
</font></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr valign="top">
<td>
<p><font face="Comic Sans MS, Arial, Helvetica, Verdana" size="-1">Thank you for your submission.</font></p>
<p><font face="Comic Sans MS, Arial, Helvetica, Verdana" size="-1">The following information has been sent to us:</font></p>
<p><font face="Comic Sans MS, Arial, Helvetica, Verdana" size="-1" color="#FFFFFF">
<?php
echo "<p><font face=\"Comic Sans MS, Arial, Helvetica, Verdana\" size=\"-1\" color=\"#000000\">";
print "Name: <b>$p_userName</b><br>\n";
print "Address: <b>$p_Address1, $p_Address2</b><br>";
print "Age: <b>$p_Age</b><br>\n";
print "Email Address: <b>$p_email</b><br>\n";
print "Current Employer: <b>$p_Employer</b><br>\n";
print "Current Position: <b>$p_Position</b><br>\n";
print "Wanted WorkType: <b>$p_WorkType</b><br>\n";
print "Telephone Number: <b>$p_Telephone</b><br>\n";
print "Mobile Number: <b>$p_Mobile</b><br>\n";
print "Best Time to Contact You: <b>$p_Time</b><br>\n";
print "Time of Day to Contact You: <b>$p_TimeOfDay</b><br>\n";
print "</font></p>";
if ($isfile == "0") {
print "<p><font face=\"Comic Sans MS, Arial, Helvetica, Verdana\" size=\"-1\" color=\"#000000\">";
print "You chose not to upload your CV.<br>";
} else {
print "<p><font face=\"Comic Sans MS, Arial, Helvetica, Verdana\" size=\"-1\" color=\"#000000\">You also chose to upload a file to our server. Here are the details of that file:</font></p>";
print "<p><font face=\"Comic Sans MS, Arial, Helvetica, Verdana\" size=\"-1\" color=\"#000000\">";
print "Name: <b>$userfile_name</b><br>\n";
print "Size: <b>$userfile_size bytes</b><br>\n";
print "Type: <b>$userfile_type</b><br><br>\n\n";
print "Click <a href=\"http://localhost/uploads/$userfile_name\" target=\"blank\">here</a> to view it<br><br>";
print "</font>";
}
?>
<p><font face="Comic Sans MS, Arial, Helvetica, Verdana" size="-1" color="#000000">Thanks again and we'll
be in touch!</font></p>
<p> </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
</td>
</tr>
</table>
<p align="center">
<input type="button" value="Close Window" onClick="self.close()" name="button">
</p>
<p> </p>
</td>
</tr>
</table>
</body>
</html>
<-- End of betaform.php -->