HTML Form - not passing parameters

My HTML form, with filefields is not posting  data,

I've set up two test pages, one with a form and one that recieves the data the first is -

<!--#include file="../Connections/Connection.asp" -->
<!--#include file="../ScriptLibrary/incPU3Class.asp" -->
<!--#include file="../ScriptLibrary/incPU3Utils.asp" -->
<!--#include file="includes/Product-Edit-RS/Select-AdditionalImages.asp" -->
<!--#include file="includes/Product-Edit-RS/Select-Product.asp" -->
<!--#include file="includes/Product-Edit-RS/Select-MainImage.asp" -->
<!--include file="includes/editproduct-image-upload.asp" -->
<!--include file="includes/product-update.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="test2.asp" method="post" enctype="multipart/form-data" name="newprodust" id="newprodust" onSubmit="return validatenewprodust(this)">
    <strong>Product Details</strong>
    <table border="0" cellspacing="0" cellpadding="0" class="newproducttable">
      <tr>
        <td class="fixedleftwidth">Product ID</td>
        <td><input name="id" type="text" id="id" value="id here" /></td>
      </tr>
      <tr>
        <td class="fixedleftwidth">Product Name</td>
        <td><input name="name" type="text" id="name" value="namehere" /></td>
      </tr>
      <tr>
        <td class="fixedleftwidth">Main Image <span class="asterix">*</span></td>
        <td><input name="image1" type="file" id="image1" value="imagehere"/></td>
      </tr>
      <tr class="alternativerowtr">
        <td class="fixedleftwidth">Second Image (Optional)</td>
        <td><input name="image2" type="file" id="image2" value="imagehere2" /></td>
      </tr>
      <tr>
        <td class="fixedleftwidth">Third Image (Optional)</td>
        <td><input name="image3" type="file" id="image3" value="imagehere3" /></td>
      </tr>
      <tr class="alternativerowtr">
        <td class="fixedleftwidth">Fourth Image (Optional)</td>
        <td><input name="image4" type="file" id="image4" value="imagehere4" /></td>
      </tr>
      <tr>
        <td class="fixedleftwidth">Fifth Image (Optional)</td>
        <td><input name="image5" type="file" id="image5" value="imagehere5" /></td>
      </tr>
      <tr class="alternativerowtr">
        <td class="fixedleftwidth">Sixth Image (Optional)</td>
        <td><input name="image6" type="file" id="image6" value="imagehere6" /></td>
      </tr>
  </table>
    <input type="submit" name="button" id="button" value="Submit" />
<input name="faction" type="hidden" id="faction" value="fupdate" />
</form>
</body>
</html>

Open in new window


the second is (test2.asp) -

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<p>ID : <%= Request.Form("id") %></p>
<p>Name : <%= Request.Form("name") %></p>
<p>Main Image : <%= Request.Form("image1") %></p>
<p>Image 2:</p>
<p>Image 3:</p>
<p>Image 4:</p>
<p>Image 5:</p>
<p>Image 6:</p>
<p>&nbsp;</p>
</body>
</html>

Open in new window


Nothing is getting sent across...

This is the first time I have experienced an issue like this, please advise.

Thank you
garethtnashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pateljituCommented:
As your <FORM> contains attribute enctype="multipart/form-data" Request.Form would not work, please see this article for further reference:
http://www.15seconds.com/issue/981121.htm

Also you can use this free upload component for classic ASP:
http://www.freeaspupload.net/freeaspupload/download.asp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
garethtnashAuthor Commented:
You are totally correct thank you, mind if I quickly ask you another quick question?

you may recall helping me with the following multi select combi box -

<select name="category" size="4" multiple="multiple" id="category">
<%
While (NOT RsCategoriesOptions.EOF)
%><option value="<%=(RsCategoriesOptions.Fields.Item("ID").Value)%>"<%    
        do While NOT RsSelectedCategories.EOF

            If (Not isNull((RsSelectedCategories.Fields.Item("ID").Value))) Then
                If (CStr(RsCategoriesOptions.Fields.Item("ID").Value) = CStr((RsSelectedCategories.Fields.Item("ID").Value))) Then
                    Response.Write(" selected=""selected""")
                    exit do
                end if
            End if        
     
        RsSelectedCategories.MoveNext()
        loop
 %>><%=(RsCategoriesOptions.Fields.Item("Category-label").Value)%></option>
 <%
   RsCategoriesOptions.MoveNext()
Wend
%></select>

Open in new window


I've just found a slight bug, in that if only one item was selected, nothing is displayed.. more than 1 everything is displayed...

Appreciate it if you could have a quick look -

Thank you
0
pateljituCommented:
Sure glad to help:

1. @garethtnash: I've just found a slight bug, in that if only one item was selected, nothing is displayed. :
  Question: In this case is the <Select> element empty and does not display any items, if that is the case please confirm the resultset from DB for this query
RsRelatedProductOptions_cmd.CommandText = "SELECT ID, [Product-Name] FROM dbo.[Direct-Product] WHERE [Display-TGI-Direct] = 'Y' AND ID <> ? ORDER BY [Product-Name]"

basically recordset RsRelatedProductOptions should return all products available.

and

RsRelated_cmd.CommandText = "Select  R.RelatedProductID as ID from dbo. [Direct-Related-Products] R  where R.ProductID = ?"
0
garethtnashAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.