I will try to explain this completely(I hope you have time)
*****************this is my first page(includes my form)*************************
<?
include("header.php"
include("session.php"
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Form Add Procedure Documents</title>
<style>
<?
include("style_sheet.html"
?>
</style>
</head>
<body>
<div align="center">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<form ENCTYPE= "multipart\form-data" method="post" action="add_document_preview_procedure.php">
<input type="hidden" name="session_id" value="<? echo ("$session_id" ?>">
<td align="left" width="15%">Document Number</td>
<td width="5%" align="left">
<select name="group_number" maxlength="2">
<?
$doc_number_1=mssql_query("SELECT [group]
FROM [group_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_1)) {
$c1=$row["group"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="5%" align="left">
<select name="chapter_number" maxlength="2">
<?
$doc_number_chapter=mssql_query("SELECT [chapter]
FROM [chapter_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_chapter)) {
$c1=$row["chapter"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="5%" align="left">
<select name="procedure_number" maxlength="2">
<?
$doc_number_procedure=mssql_query("SELECT [procedure]
FROM [procedure_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_procedure)) {
$c1=$row["procedure"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="70%" align="left">
<select name="serial_number" maxlength="2">
<?
$doc_number_serial=mssql_query("SELECT [serial]
FROM [serial_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_serial)) {
$c1=$row["serial"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left">Document Title</td>
<td width="85%" align="left"><input type="text" name="document_title" size="50" maxlength="75"></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" width="15%" valign="top">Link Document</td>
<td align="left" width="85%">
<select name="link_document[]" multiple size="10" maxlength="1000" >
<option selected>NONE</option>
<?
$link=mssql_query("SELECT [Document Number], [Document Title], [auto_increment]
FROM [LINK_TEMP]
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($link))
{
$c1=$row["Document Number"];
$c2=$row["Document Title"];
$c3=$row["auto_increment"];
print ("<option>" echo ("$c1" print (" " echo("$c2" print("</option>"
}
?>
</select>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<td width="15%" align="left" valign="top">Reason</td>
<td width="85%" align="left" valign="top">
<select name="reasons[]" multiple>
<option selected>NONE</option>
<?
$link=mssql_query("SELECT [Reason], [auto_increment]
FROM [Reasons]
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($link)) {
$c1=$row["Reason"];
$c2=$row["auto_increment"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></TD>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Purpose</td>
<td width="85%" align="left"><input type="text" name="purpose" size="50" maxlength="100"></input></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Scale</td>
<td width="85%" align="left"><input type="text" name="scale" size="50" maxlength="100"></input></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Responsibilities</td>
<td width="85%" align="left"><textarea name="responsibilities" rows="10" cols="50" wrap="hard"></textarea></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Comments/Notes</td>
<td width="85%" align="left"><textarea name="comments" rows="5" cols="50" wrap="hard"></textarea></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Attachments</td>
<input type="File" name="userfile" size="30" maxlength="255">
</td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top"><input type="submit" name="submit" wrap="hard"></td>
</tr>
</table>
</form>
<div align="center">
</body>
</html>
*******************second page****************
<?
include("header.php"
include("session.php"
//check MAIN and temp_approval for duplicate document_numbers
$document_number = ("$group_number$chapter_number$procedure_number$serial_number"
$doc_main=mssql_query("SELECT document_number
FROM final_main
WHERE document_number = '$document_number'
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_main)) {
$c1=$row["document_number"];
$result=$c1;
}
if(empty($result))
{
$result="0";
}
else
{
$result=$result;
}
if ($document_number == $result)
{
HEADER("LOCATION:error_add_document.php"
}
$doc_temp=mssql_query("SELECT document_number
FROM temp_approval
WHERE document_number = '$document_number'
"
OR DIE ("Query LINK Failed"
WHILE($row2=mssql_fetch_array($doc_temp)) {
$c2=$row2["document_number"];
$result_temp=$c2;
}
if(empty($result_temp))
{
$result_temp="0";
}
else
{
$result=$result_temp;
}
if ($document_number == $result)
{
HEADER("LOCATION:error_add_document.php"
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
Add Document Preview Procedure
</title>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1250">
<script language=JavaScript src="menu.js"></script>
</head>
<style>
<?
include("style_sheet.html"
?>
</style>
<body topmargin="0" leftmargin="0">
<?
$date= date("m-d-y"
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%">
<table width="100%" height="43" cellspacing="0" border="0" cellpadding="0">
<tr>
<td>
<table width="219" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="219">
<div valign="bottom">
<a href="index.php?session_id=<? echo $session_id ?>"><img src="images/dhllogo.gif" width="219" height="43" alt="Dobrodošli na intranetnih straneh DHL-a" border="0"></a></div>
</td>
</tr>
</table>
</td>
<td width="279" align="right">
<table width="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="279">
<div valign="bottom">
<img src="images/airplane.gif" width="279" height="43" alt="" border="0"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="260" bgcolor="#990000">
<table width="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" width="280" height="20" bgcolor="#990000" class="mnulnk1">
<!--a href="navigation_add_document.php?session_id=<? echo $session_id ?>" class="mnulnk">Create</a>
<a href="navigation_find_revise_document.php?session_id=<? echo $session_id ?>" class="mnulnk">Revise</a>
<a href="navigation_find_approval_add_documents.php?session_id=<? echo $session_id ?>" class="mnulnk">Approve</a>
<a href="navigation_find_final_approval_add_documents.php?session_id=<? echo $session_id ?>" class="mnulnk">Final Approval</a-->
</td>
<td width="1"></td>
</tr>
</table>
</td>
<td width="60%">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20" bgcolor="#990000">
<!--div valign="bottom">
<img class="img1" src="../images/barend.gif" width="72" height="20" alt="" border="0"></div-->
</td>
</tr>
</table>
</td>
<td width="322" align="right" bgcolor="#ffffff">
<table align="right" width="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="322" height="20">
<div valign="bottom">
<img src="images/midprocpv.gif" width="322" height="20" alt="" border="0"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<table align="center" border="0" width="575" height="910" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><img src="images/dhllogoPSK.gif" width="571" height="37" alt="" border="0">
</td>
</tr>
<tr>
<td colspan="2"><img src="images/doctitle.gif" width="41" height="14" alt="" border="0">
<span class="doctext1">
<?
echo ("$document_title"
?>
</span>
</td>
</tr>
<tr>
<td width="351" align="left"><img src="images/docnum.gif" width="127" height="11" alt="" border="0">
<span class="doctext2">
<?
echo ("$document_number"
?></span>
</td>
<td width="220" align="right"><img src="images/docrev.gif" width="59" height="11" alt="" border="0">
<span class="doctext2">
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="575" valign="top" height="750"><br>
<table width="575" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="doctext3" width="20"> <!-- Number -->
1.
</td>
<td width="555" class="doctext3"> <!-- Sub-Title -->
PURPOSE
</td>
</tr>
<tr>
<td width="20"> <!-- Empty -->
</td>
<td width="100%" class="doctext4">
<?
echo ("$purpose"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
2.
</td>
<td class="doctext3"> <!-- Sub-Title -->
SCALE
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo ("$scale"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
3.
</td>
<td class="doctext3"> <!-- Sub-Title -->
RESPONSIBILITIES
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo nl2br("$responsibilities"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
4.
</td>
<td class="doctext3"> <!-- Sub-Title -->
LINK DOCUMENTS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<? //Link Document Array
if (is_array($link_document))
{
while(list($key, $value) = each($link_document))
{
$key++;
eval("\$variable_$key = '$value';"
echo ("$value <br>"
}
}
?>
<?
$counter= 0;
while ($counter <20)
{
$counter++;
$variable_counter="variable_$counter";
if(empty($$variable_counter))
{
$$variable_counter = 0;
}
else
{
$$variable_counter = $$variable_counter;
}
if($$variable_counter > 0)
{
echo $$variable_counter;
echo ("<br>"
}
}
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
5.
</td>
<td class="doctext3"> <!-- Sub-Title -->
NOTES
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo nl2br($comments);
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
6.
</td>
<td class="doctext3"> <!-- Sub-Title -->
REASONS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
if (is_array($reasons))
{
while(list($key, $value) = each($reasons))
{
$key++;
eval("\$variable_reasons_$key = '$value';"
echo ("$value <br>"
}
}
?>
<?
$counter= 0;
while ($counter <9)
{
$counter++;
$reasons_counter="variable_reasons_$counter";
if(empty($$reasons_counter))
{
$$reasons_counter = 0;
}
else
{
$$reasons_counter = $$reasons_counter;
}
if($$reasons_counter > 0)
{
echo $$reasons_counter;
echo ("<br>"
}
}
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
7.
</td>
<td class="doctext3"> <!-- Sub-Title -->
ATTACHMENTS / PROCESS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo ("<image src=$userfile>"
?>
<p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="bottom">
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="571"><img src="images/dhlstripe.gif" width="571" height="8" alt="" border="0">
</td>
</tr>
<tr>
<td width="571">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" colspan="2" align="left"><img src="images/docauth.gif" width="51" height="16" alt="" border="0">
<span class="doctext5"><?
echo ($visitor_id);
?></span>
</td>
<td width="50%" align="right">
<img src="images/docappr.gif" width="69" height="16" alt="" border="0">
<span class="doctext5">Pending</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="571" bgcolor="#ffffff">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="225">
</td>
<td width="125" align="center" class="doctext2">
</td>
<td width="225" align="right"><img src="images/docdate.gif" width="35" height="11" alt="" border="0">
<span class="doctext2">
<?
echo ($date);
?></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<!-- Set style to print on next page -->
<div style="page-break-before: always" align="center" class="lnkbracket">
<form ENCTYPE= "multipart\form-data" method="post" action="approval_script.php">
<INPUT TYPE=hidden name=MAX_FILE_SIZE value=100000>
<input type="hidden" name="session_id" value="<? echo("$session_id" ?>">
<a href="JavaScript:history.back(1)"><img width="70" height="21" src="images/back1.gif" alt="previous page" border="0"></a>
<?
//pass document_number to approval_script.php
echo ("<input type=hidden name=document_number value=\"$document_number\">"
//pass document_title to approval_script.php
echo ("<input type=hidden name=document_title value=\"$document_title\">"
//pass link_documents to approval_script.php
echo ("<input type=hidden name=variable_1 value=\"$variable_1\">"
echo ("<input type=hidden name=variable_2 value=\"$variable_2\">"
echo ("<input type=hidden name=variable_3 value=\"$variable_3\">"
echo ("<input type=hidden name=variable_4 value=\"$variable_4\">"
echo ("<input type=hidden name=variable_5 value=\"$variable_5\">"
echo ("<input type=hidden name=variable_6 value=\"$variable_6\">"
echo ("<input type=hidden name=variable_7 value=\"$variable_7\">"
echo ("<input type=hidden name=variable_8 value=\"$variable_8\">"
echo ("<input type=hidden name=variable_9 value=\"$variable_9\">"
echo ("<input type=hidden name=variable_10 value=\"$variable_10\">"
echo ("<input type=hidden name=variable_11 value=\"$variable_11\">"
echo ("<input type=hidden name=variable_12 value=\"$variable_12\">"
echo ("<input type=hidden name=variable_13 value=\"$variable_13\">"
echo ("<input type=hidden name=variable_14 value=\"$variable_14\">"
echo ("<input type=hidden name=variable_15 value=\"$variable_15\">"
echo ("<input type=hidden name=variable_16 value=\"$variable_16\">"
echo ("<input type=hidden name=variable_17 value=\"$variable_17\">"
echo ("<input type=hidden name=variable_18 value=\"$variable_18\">"
echo ("<input type=hidden name=variable_19 value=\"$variable_19\">"
echo ("<input type=hidden name=variable_20 value=\"$variable_20\">"
//pass reasons to approval_script.php
echo ("<input type=hidden name=reasons_1 value=\"$variable_reasons_1\">"
echo ("<input type=hidden name=reasons_2 value=\"$variable_reasons_2\">"
echo ("<input type=hidden name=reasons_3 value=\"$variable_reasons_3\">"
echo ("<input type=hidden name=reasons_4 value=\"$variable_reasons_4\">"
echo ("<input type=hidden name=reasons_5 value=\"$variable_reasons_5\">"
echo ("<input type=hidden name=reasons_6 value=\"$variable_reasons_6\">"
echo ("<input type=hidden name=reasons_7 value=\"$variable_reasons_7\">"
echo ("<input type=hidden name=reasons_8 value=\"$variable_reasons_8\">"
echo ("<input type=hidden name=reasons_9 value=\"$variable_reasons_9\">"
//pass purpose to approval_script.php
echo ("<input type=hidden name=purpose value=\"$purpose\">"
//pass scale to approval_script.php
echo ("<input type=hidden name=scale value=\"$scale\">"
//pass responsibilities to approval_script.php
echo ("<input type=hidden name=responsibilities value=\""
echo nl2br($responsibilities);
echo ("\">"
//pass comments/notes to approval_script.php
echo ("<input type=hidden name=notes value=\""
echo nl2br($comments);
echo ("\">"
//pass date to approval_script.php
echo ("<input type=hidden name=date value=\"$date\">"
//pass written_by to approval_script.php
echo ("<input type=hidden name=written_by value=\"$visitor_id\">"
//pass image to approval_script.php
echo ("<input type=hidden name=userfile value=\"$userfile\">"
echo("<input type=hidden name=newname size=30 maxlength=\"^255\" value=$document_number>"
?>
<input type="image" name="start_approval" border="0" src="images/submtbtn.gif"></a>
</form>
</div>
</div>
<br><br>
</body>
</html>
************************third page(this ncludes the script that is sopose to upload file**************
<?
include("header.php"
include("session.php"
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Approval Script</title>
<style>
<?
include("style_sheet.html"
?>
</style>
</head>
<body>
<!---Approve_Temp Update--->
<?
// inserts doc info into approval_temp
mssql_query("INSERT INTO temp_approval (document_number, document_title, purpose, responsibilities, notes, scale, date_created, written_by)
VALUES ('$document_number', '$document_title', '$purpose', '$responsibilities', '$notes', '$scale', '$date', '$written_by')
"
// inserts link_docs into link_doc_temp
mssql_query("INSERT INTO temp_link_doc (document_number, link_doc_1, link_doc_2, link_doc_3, link_doc_4, link_doc_5, link_doc_6, link_doc_7, link_doc_8, link_doc_9, link_doc_10, link_doc_11, link_doc_12, link_doc_13, link_doc_14, link_doc_15, link_doc_16, link_doc_17, link_doc_18, link_doc_19, link_doc_20)
VALUES ('$document_number', '$variable_1', '$variable_2', '$variable_3', '$variable_4', '$variable_5', '$variable_6', '$variable_7', '$variable_8', '$variable_9', '$variable_10', '$variable_11', '$variable_12', '$variable_13', '$variable_14', '$variable_15', '$variable_16', '$variable_17', '$variable_18', '$variable_19', '$variable_20')
"
// inserts reasons into into reasons_temp
mssql_query("INSERT INTO temp_reasons (document_number, reason_1, reason_2, reason_3, reason_4, reason_5, reason_6, reason_7, reason_8, reason_9)
VALUES ('$document_number', '$reasons_1', '$reasons_2', '$reasons_3', '$reasons_4', '$reasons_5', '$reasons_6', '$reasons_7', '$reasons_8', '$reasons_9')
"
?>
<?
function do_upload($filename,$newname) {
$file = basename($filename);
$tmp_upload_path = "c:\\php\\uploadtemp\\";
$new_file_name = "c:\\php\\uploadtemp\\".$newname;
if (!copy($tmp_upload_path.$file, $new_file_name)) echo "failed to copy file<br>\n";
return;
}
?>
<?php
do_upload($userfile,$newname);
?>
<!---E-mail Notification to Lucinda--->
<?
mail("christopher.seidel@jerovsek.si" ,"Add Document Request",
"<body topmargin=\"0\" leftmargin=\"0\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"100%\">
<table width=\"100%\" height=\"43\" cellspacing=\"0\" border=\"0\" cellpadding=\"0\">
<tr>
<td>
<table width=\"219\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"219\">
<div valign=\"bottom\">
<a href=\"index.php?session_id=<? echo $session_id ?>\"><img src=\"C:\\Inetpub\\ width=\"219\" height=\"43\" alt=\"Dobrodošli na intranetnih straneh DHL-a\" border=\"0\"></a></div>
</td>
</tr>
</table>
</td>
<td width=\"279\" align=\"right\">
<table width=\"279\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"279\">
<div valign=\"bottom\">
<img src=\"C:\\Inetpub\\ width=\"279\" height=\"43\" alt=\"\" border=\"0\"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"260\" bgcolor=\"#990000\">
<table width=\"260\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td valign=\"middle\" width=\"260\" height=\"20\" bgcolor=\"#990000\" class=\"mnulnk1\">
</td>
<td width=\"1\"></td>
</tr>
</table>
</td>
<td width=\"60%\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td height=\"20\" bgcolor=\"#990000\">
<!--div valign=\"bottom\">
<img class=\"img1\" src=\"C:\\Inetpub\\ width=\"72\" height=\"20\" alt=\"\" border=\"0\"></div-->
</td>
</tr>
</table>
</td>
<td width=\"322\" align=\"right\" bgcolor=\"#ffffff\">
<table align=\"right\" width=\"279\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"322\" height=\"20\">
<div valign=\"bottom\">
<img src=\"C:\\Inetpub\\ width=\"322\" height=\"20\" alt=\"\" border=\"0\"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<div align=\"center\">
<table width=\"350\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"300\" height=\"120\" align=\"right\" valign=\"top\">
<!-- Data -->
<div align=\"center\" class=\"doctext6\">
$visitor_id has requested document: <b>$document_number</b> to be added to ISO track.
</div>
</td></tr>
<td width=\"300\" height=\"120\" align=\"right\" valign=\"top\">
<!-- Data -->
<div align=\"center\" class=\"doctext6\">
<a href=\"http:\\\\127.0.0.1\\dhl\\current_development\\docs.php\">Approve</a>
</div>
</td></tr>
</table>
</div>
</td>
</tr>
</table>"
,
"Content-type: text/html"
?>
<?
include("request_submited.php"
?>
</body>
</html>
********************conclusion***************
I have 3 layers
layer 1:
The user browses for file to upload(page 1)
layer 2:
The user previews the image along with other <input> fields to be updated to SQL server(page 3)
layer 3:
this is the script that updates SQL SERVER with <input Type="text"> and also should upload image <inpupt type="file"> via script.
however I recieve this ERROR
Warning: Unable to open 'c:\php\uploadtemp\airplane.gif' for reading: No such file or directory in c:\inetpub\ on line 46
failed to copy file
I am not sure if I can do this or not?
I hope you can help it would be great!!!!!!!!!!!
Thanks a MILLION in advance
christopher
*****************this is my first page(includes my form)*************************
<?
include("header.php"
include("session.php"
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Form Add Procedure Documents</title>
<style>
<?
include("style_sheet.html"
?>
</style>
</head>
<body>
<div align="center">
<table width="100%" cellspacing="0" cellpadding="3" border="0">
<tr>
<form ENCTYPE= "multipart\form-data" method="post" action="add_document_preview_procedure.php">
<input type="hidden" name="session_id" value="<? echo ("$session_id" ?>">
<td align="left" width="15%">Document Number</td>
<td width="5%" align="left">
<select name="group_number" maxlength="2">
<?
$doc_number_1=mssql_query("SELECT [group]
FROM [group_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_1)) {
$c1=$row["group"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="5%" align="left">
<select name="chapter_number" maxlength="2">
<?
$doc_number_chapter=mssql_query("SELECT [chapter]
FROM [chapter_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_chapter)) {
$c1=$row["chapter"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="5%" align="left">
<select name="procedure_number" maxlength="2">
<?
$doc_number_procedure=mssql_query("SELECT [procedure]
FROM [procedure_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_procedure)) {
$c1=$row["procedure"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
<td width="70%" align="left">
<select name="serial_number" maxlength="2">
<?
$doc_number_serial=mssql_query("SELECT [serial]
FROM [serial_number]"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_number_serial)) {
$c1=$row["serial"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left">Document Title</td>
<td width="85%" align="left"><input type="text" name="document_title" size="50" maxlength="75"></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" width="15%" valign="top">Link Document</td>
<td align="left" width="85%">
<select name="link_document[]" multiple size="10" maxlength="1000" >
<option selected>NONE</option>
<?
$link=mssql_query("SELECT [Document Number], [Document Title], [auto_increment]
FROM [LINK_TEMP]
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($link))
{
$c1=$row["Document Number"];
$c2=$row["Document Title"];
$c3=$row["auto_increment"];
print ("<option>" echo ("$c1" print (" " echo("$c2" print("</option>"
}
?>
</select>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<td width="15%" align="left" valign="top">Reason</td>
<td width="85%" align="left" valign="top">
<select name="reasons[]" multiple>
<option selected>NONE</option>
<?
$link=mssql_query("SELECT [Reason], [auto_increment]
FROM [Reasons]
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($link)) {
$c1=$row["Reason"];
$c2=$row["auto_increment"];
print ("<option>" echo ("$c1" print("</option>"
}
?>
</select></TD>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Purpose</td>
<td width="85%" align="left"><input type="text" name="purpose" size="50" maxlength="100"></input></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Scale</td>
<td width="85%" align="left"><input type="text" name="scale" size="50" maxlength="100"></input></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Responsibilities</td>
<td width="85%" align="left"><textarea name="responsibilities" rows="10" cols="50" wrap="hard"></textarea></td>
</tr>
</table>
<br class="spacer">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Comments/Notes</td>
<td width="85%" align="left"><textarea name="comments" rows="5" cols="50" wrap="hard"></textarea></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top">Attachments</td>
<input type="File" name="userfile" size="30" maxlength="255">
</td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td width="15%" align="left" valign="top"><input type="submit" name="submit" wrap="hard"></td>
</tr>
</table>
</form>
<div align="center">
</body>
</html>
*******************second page****************
<?
include("header.php"
include("session.php"
//check MAIN and temp_approval for duplicate document_numbers
$document_number = ("$group_number$chapter_number$procedure_number$serial_number"
$doc_main=mssql_query("SELECT document_number
FROM final_main
WHERE document_number = '$document_number'
"
OR DIE ("Query LINK Failed"
WHILE($row=mssql_fetch_array($doc_main)) {
$c1=$row["document_number"];
$result=$c1;
}
if(empty($result))
{
$result="0";
}
else
{
$result=$result;
}
if ($document_number == $result)
{
HEADER("LOCATION:error_add_document.php"
}
$doc_temp=mssql_query("SELECT document_number
FROM temp_approval
WHERE document_number = '$document_number'
"
OR DIE ("Query LINK Failed"
WHILE($row2=mssql_fetch_array($doc_temp)) {
$c2=$row2["document_number"];
$result_temp=$c2;
}
if(empty($result_temp))
{
$result_temp="0";
}
else
{
$result=$result_temp;
}
if ($document_number == $result)
{
HEADER("LOCATION:error_add_document.php"
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>
Add Document Preview Procedure
</title>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1250">
<script language=JavaScript src="menu.js"></script>
</head>
<style>
<?
include("style_sheet.html"
?>
</style>
<body topmargin="0" leftmargin="0">
<?
$date= date("m-d-y"
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%">
<table width="100%" height="43" cellspacing="0" border="0" cellpadding="0">
<tr>
<td>
<table width="219" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="219">
<div valign="bottom">
<a href="index.php?session_id=<? echo $session_id ?>"><img src="images/dhllogo.gif" width="219" height="43" alt="Dobrodošli na intranetnih straneh DHL-a" border="0"></a></div>
</td>
</tr>
</table>
</td>
<td width="279" align="right">
<table width="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="279">
<div valign="bottom">
<img src="images/airplane.gif" width="279" height="43" alt="" border="0"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="260" bgcolor="#990000">
<table width="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" width="280" height="20" bgcolor="#990000" class="mnulnk1">
<!--a href="navigation_add_document.php?session_id=<? echo $session_id ?>" class="mnulnk">Create</a>
<a href="navigation_find_revise_document.php?session_id=<? echo $session_id ?>" class="mnulnk">Revise</a>
<a href="navigation_find_approval_add_documents.php?session_id=<? echo $session_id ?>" class="mnulnk">Approve</a>
<a href="navigation_find_final_approval_add_documents.php?session_id=<? echo $session_id ?>" class="mnulnk">Final Approval</a-->
</td>
<td width="1"></td>
</tr>
</table>
</td>
<td width="60%">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20" bgcolor="#990000">
<!--div valign="bottom">
<img class="img1" src="../images/barend.gif" width="72" height="20" alt="" border="0"></div-->
</td>
</tr>
</table>
</td>
<td width="322" align="right" bgcolor="#ffffff">
<table align="right" width="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="322" height="20">
<div valign="bottom">
<img src="images/midprocpv.gif" width="322" height="20" alt="" border="0"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<table align="center" border="0" width="575" height="910" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><img src="images/dhllogoPSK.gif" width="571" height="37" alt="" border="0">
</td>
</tr>
<tr>
<td colspan="2"><img src="images/doctitle.gif" width="41" height="14" alt="" border="0">
<span class="doctext1">
<?
echo ("$document_title"
?>
</span>
</td>
</tr>
<tr>
<td width="351" align="left"><img src="images/docnum.gif" width="127" height="11" alt="" border="0">
<span class="doctext2">
<?
echo ("$document_number"
?></span>
</td>
<td width="220" align="right"><img src="images/docrev.gif" width="59" height="11" alt="" border="0">
<span class="doctext2">
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="575" valign="top" height="750"><br>
<table width="575" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="doctext3" width="20"> <!-- Number -->
1.
</td>
<td width="555" class="doctext3"> <!-- Sub-Title -->
PURPOSE
</td>
</tr>
<tr>
<td width="20"> <!-- Empty -->
</td>
<td width="100%" class="doctext4">
<?
echo ("$purpose"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
2.
</td>
<td class="doctext3"> <!-- Sub-Title -->
SCALE
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo ("$scale"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
3.
</td>
<td class="doctext3"> <!-- Sub-Title -->
RESPONSIBILITIES
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo nl2br("$responsibilities"
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
4.
</td>
<td class="doctext3"> <!-- Sub-Title -->
LINK DOCUMENTS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<? //Link Document Array
if (is_array($link_document))
{
while(list($key, $value) = each($link_document))
{
$key++;
eval("\$variable_$key = '$value';"
echo ("$value <br>"
}
}
?>
<?
$counter= 0;
while ($counter <20)
{
$counter++;
$variable_counter="variable_$counter";
if(empty($$variable_counter))
{
$$variable_counter = 0;
}
else
{
$$variable_counter = $$variable_counter;
}
if($$variable_counter > 0)
{
echo $$variable_counter;
echo ("<br>"
}
}
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
5.
</td>
<td class="doctext3"> <!-- Sub-Title -->
NOTES
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo nl2br($comments);
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
6.
</td>
<td class="doctext3"> <!-- Sub-Title -->
REASONS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
if (is_array($reasons))
{
while(list($key, $value) = each($reasons))
{
$key++;
eval("\$variable_reasons_$key = '$value';"
echo ("$value <br>"
}
}
?>
<?
$counter= 0;
while ($counter <9)
{
$counter++;
$reasons_counter="variable_reasons_$counter";
if(empty($$reasons_counter))
{
$$reasons_counter = 0;
}
else
{
$$reasons_counter = $$reasons_counter;
}
if($$reasons_counter > 0)
{
echo $$reasons_counter;
echo ("<br>"
}
}
?>
<p>
</td>
</tr>
<tr>
<td width="20" class="doctext3"> <!-- Number -->
7.
</td>
<td class="doctext3"> <!-- Sub-Title -->
ATTACHMENTS / PROCESS
</td>
</tr>
<tr>
<td> <!-- Empty -->
</td>
<td class="doctext4">
<?
echo ("<image src=$userfile>"
?>
<p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="bottom">
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="571" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="571"><img src="images/dhlstripe.gif" width="571" height="8" alt="" border="0">
</td>
</tr>
<tr>
<td width="571">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" colspan="2" align="left"><img src="images/docauth.gif" width="51" height="16" alt="" border="0">
<span class="doctext5"><?
echo ($visitor_id);
?></span>
</td>
<td width="50%" align="right">
<img src="images/docappr.gif" width="69" height="16" alt="" border="0">
<span class="doctext5">Pending</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="571" bgcolor="#ffffff">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="225">
</td>
<td width="125" align="center" class="doctext2">
</td>
<td width="225" align="right"><img src="images/docdate.gif" width="35" height="11" alt="" border="0">
<span class="doctext2">
<?
echo ($date);
?></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<!-- Set style to print on next page -->
<div style="page-break-before: always" align="center" class="lnkbracket">
<form ENCTYPE= "multipart\form-data" method="post" action="approval_script.php">
<INPUT TYPE=hidden name=MAX_FILE_SIZE value=100000>
<input type="hidden" name="session_id" value="<? echo("$session_id" ?>">
<a href="JavaScript:history.back(1)"><img width="70" height="21" src="images/back1.gif" alt="previous page" border="0"></a>
<?
//pass document_number to approval_script.php
echo ("<input type=hidden name=document_number value=\"$document_number\">"
//pass document_title to approval_script.php
echo ("<input type=hidden name=document_title value=\"$document_title\">"
//pass link_documents to approval_script.php
echo ("<input type=hidden name=variable_1 value=\"$variable_1\">"
echo ("<input type=hidden name=variable_2 value=\"$variable_2\">"
echo ("<input type=hidden name=variable_3 value=\"$variable_3\">"
echo ("<input type=hidden name=variable_4 value=\"$variable_4\">"
echo ("<input type=hidden name=variable_5 value=\"$variable_5\">"
echo ("<input type=hidden name=variable_6 value=\"$variable_6\">"
echo ("<input type=hidden name=variable_7 value=\"$variable_7\">"
echo ("<input type=hidden name=variable_8 value=\"$variable_8\">"
echo ("<input type=hidden name=variable_9 value=\"$variable_9\">"
echo ("<input type=hidden name=variable_10 value=\"$variable_10\">"
echo ("<input type=hidden name=variable_11 value=\"$variable_11\">"
echo ("<input type=hidden name=variable_12 value=\"$variable_12\">"
echo ("<input type=hidden name=variable_13 value=\"$variable_13\">"
echo ("<input type=hidden name=variable_14 value=\"$variable_14\">"
echo ("<input type=hidden name=variable_15 value=\"$variable_15\">"
echo ("<input type=hidden name=variable_16 value=\"$variable_16\">"
echo ("<input type=hidden name=variable_17 value=\"$variable_17\">"
echo ("<input type=hidden name=variable_18 value=\"$variable_18\">"
echo ("<input type=hidden name=variable_19 value=\"$variable_19\">"
echo ("<input type=hidden name=variable_20 value=\"$variable_20\">"
//pass reasons to approval_script.php
echo ("<input type=hidden name=reasons_1 value=\"$variable_reasons_1\">"
echo ("<input type=hidden name=reasons_2 value=\"$variable_reasons_2\">"
echo ("<input type=hidden name=reasons_3 value=\"$variable_reasons_3\">"
echo ("<input type=hidden name=reasons_4 value=\"$variable_reasons_4\">"
echo ("<input type=hidden name=reasons_5 value=\"$variable_reasons_5\">"
echo ("<input type=hidden name=reasons_6 value=\"$variable_reasons_6\">"
echo ("<input type=hidden name=reasons_7 value=\"$variable_reasons_7\">"
echo ("<input type=hidden name=reasons_8 value=\"$variable_reasons_8\">"
echo ("<input type=hidden name=reasons_9 value=\"$variable_reasons_9\">"
//pass purpose to approval_script.php
echo ("<input type=hidden name=purpose value=\"$purpose\">"
//pass scale to approval_script.php
echo ("<input type=hidden name=scale value=\"$scale\">"
//pass responsibilities to approval_script.php
echo ("<input type=hidden name=responsibilities value=\""
echo nl2br($responsibilities);
echo ("\">"
//pass comments/notes to approval_script.php
echo ("<input type=hidden name=notes value=\""
echo nl2br($comments);
echo ("\">"
//pass date to approval_script.php
echo ("<input type=hidden name=date value=\"$date\">"
//pass written_by to approval_script.php
echo ("<input type=hidden name=written_by value=\"$visitor_id\">"
//pass image to approval_script.php
echo ("<input type=hidden name=userfile value=\"$userfile\">"
echo("<input type=hidden name=newname size=30 maxlength=\"^255\" value=$document_number>"
?>
<input type="image" name="start_approval" border="0" src="images/submtbtn.gif"></a>
</form>
</div>
</div>
<br><br>
</body>
</html>
************************third page(this ncludes the script that is sopose to upload file**************
<?
include("header.php"
include("session.php"
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Approval Script</title>
<style>
<?
include("style_sheet.html"
?>
</style>
</head>
<body>
<!---Approve_Temp Update--->
<?
// inserts doc info into approval_temp
mssql_query("INSERT INTO temp_approval (document_number, document_title, purpose, responsibilities, notes, scale, date_created, written_by)
VALUES ('$document_number', '$document_title', '$purpose', '$responsibilities', '$notes', '$scale', '$date', '$written_by')
"
// inserts link_docs into link_doc_temp
mssql_query("INSERT INTO temp_link_doc (document_number, link_doc_1, link_doc_2, link_doc_3, link_doc_4, link_doc_5, link_doc_6, link_doc_7, link_doc_8, link_doc_9, link_doc_10, link_doc_11, link_doc_12, link_doc_13, link_doc_14, link_doc_15, link_doc_16, link_doc_17, link_doc_18, link_doc_19, link_doc_20)
VALUES ('$document_number', '$variable_1', '$variable_2', '$variable_3', '$variable_4', '$variable_5', '$variable_6', '$variable_7', '$variable_8', '$variable_9', '$variable_10', '$variable_11', '$variable_12', '$variable_13', '$variable_14', '$variable_15', '$variable_16', '$variable_17', '$variable_18', '$variable_19', '$variable_20')
"
// inserts reasons into into reasons_temp
mssql_query("INSERT INTO temp_reasons (document_number, reason_1, reason_2, reason_3, reason_4, reason_5, reason_6, reason_7, reason_8, reason_9)
VALUES ('$document_number', '$reasons_1', '$reasons_2', '$reasons_3', '$reasons_4', '$reasons_5', '$reasons_6', '$reasons_7', '$reasons_8', '$reasons_9')
"
?>
<?
function do_upload($filename,$newname) {
$file = basename($filename);
$tmp_upload_path = "c:\\php\\uploadtemp\\";
$new_file_name = "c:\\php\\uploadtemp\\".$newname;
if (!copy($tmp_upload_path.$file, $new_file_name)) echo "failed to copy file<br>\n";
return;
}
?>
<?php
do_upload($userfile,$newname);
?>
<!---E-mail Notification to Lucinda--->
<?
mail("christopher.seidel@jerovsek.si" ,"Add Document Request",
"<body topmargin=\"0\" leftmargin=\"0\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"100%\">
<table width=\"100%\" height=\"43\" cellspacing=\"0\" border=\"0\" cellpadding=\"0\">
<tr>
<td>
<table width=\"219\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"219\">
<div valign=\"bottom\">
<a href=\"index.php?session_id=<? echo $session_id ?>\"><img src=\"C:\\Inetpub\\ width=\"219\" height=\"43\" alt=\"Dobrodošli na intranetnih straneh DHL-a\" border=\"0\"></a></div>
</td>
</tr>
</table>
</td>
<td width=\"279\" align=\"right\">
<table width=\"279\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"279\">
<div valign=\"bottom\">
<img src=\"C:\\Inetpub\\ width=\"279\" height=\"43\" alt=\"\" border=\"0\"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"260\" bgcolor=\"#990000\">
<table width=\"260\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td valign=\"middle\" width=\"260\" height=\"20\" bgcolor=\"#990000\" class=\"mnulnk1\">
</td>
<td width=\"1\"></td>
</tr>
</table>
</td>
<td width=\"60%\">
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td height=\"20\" bgcolor=\"#990000\">
<!--div valign=\"bottom\">
<img class=\"img1\" src=\"C:\\Inetpub\\ width=\"72\" height=\"20\" alt=\"\" border=\"0\"></div-->
</td>
</tr>
</table>
</td>
<td width=\"322\" align=\"right\" bgcolor=\"#ffffff\">
<table align=\"right\" width=\"279\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"322\" height=\"20\">
<div valign=\"bottom\">
<img src=\"C:\\Inetpub\\ width=\"322\" height=\"20\" alt=\"\" border=\"0\"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
<div align=\"center\">
<table width=\"350\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td width=\"300\" height=\"120\" align=\"right\" valign=\"top\">
<!-- Data -->
<div align=\"center\" class=\"doctext6\">
$visitor_id has requested document: <b>$document_number</b> to be added to ISO track.
</div>
</td></tr>
<td width=\"300\" height=\"120\" align=\"right\" valign=\"top\">
<!-- Data -->
<div align=\"center\" class=\"doctext6\">
<a href=\"http:\\\\127.0.0.1\\dhl\\current_development\\docs.php\">Approve</a>
</div>
</td></tr>
</table>
</div>
</td>
</tr>
</table>"
,
"Content-type: text/html"
?>
<?
include("request_submited.php"
?>
</body>
</html>
********************conclusion***************
I have 3 layers
layer 1:
The user browses for file to upload(page 1)
layer 2:
The user previews the image along with other <input> fields to be updated to SQL server(page 3)
layer 3:
this is the script that updates SQL SERVER with <input Type="text"> and also should upload image <inpupt type="file"> via script.
however I recieve this ERROR
Warning: Unable to open 'c:\php\uploadtemp\airplane.gif' for reading: No such file or directory in c:\inetpub\ on line 46
failed to copy file
I am not sure if I can do this or not?
I hope you can help it would be great!!!!!!!!!!!
Thanks a MILLION in advance
christopher