logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-08-2008, 03:41 AM   #1
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default asp help

Why am I getting this error?
"No variables sent to form! Unable to process request."

form on the server:
http://www.precision-design.net/contact.htm

Code:
<form action="gdform.asp" method="post" enctype="text/plain" name="precision_form" target="_self" id="precision_form">
      <input type="hidden" name="subject" value="Form Submission" />
      <input type="hidden" name="redirect" value="thankyou.html" /> 
        <blockquote>
          <p align="left" class="style6"><strong>Contact Us:</strong></p>
          <p align="left" class="style6">Again, thank you for your interest in Precision Design, LLC. Please, feel free   to contact us with any questions or comments.</p>
        </blockquote>
        <table width="60%" border="4" align="center" cellpadding="5" cellspacing="0" bordercolor="#2B358D" id="comments" summary="Precision Design comment form.">
          <tr>
            <td width="19%"><div align="right"><span class="style4">Name</span>:</div></td>
            <td width="81%"><input name="name" type="text" id="name" size="40" /></td>
          </tr>
          <tr>
            <td width="19%" class="style4"><div align="right">Email:</div></td>
            <td><input name="email" type="text" id="email" value="Email address" size="40" /></td>
          </tr>
          <tr>
            <td width="19%" class="style4">Comments:</td>
            <td><textarea name="comments" id="comments" cols="45" rows="4">Please add your comments</textarea></td>
          </tr>
          <tr>
            <td class="style4"><div align="right">
              <input type="submit" name="button" id="button" value="Submit" />
            </div></td>
            <td><div align="left">
              <input type="reset" name="reset" id="reset" value="Reset" />
            </div></td>
          </tr>
        </table></form>
I tried contacting godaddy...but they said there is no problem on there end.

I really don't know a lot about this, I saw the example from godaddy to just change my form action to "gdform.asp" and method to "post"

any help is greatly appreciated.
Nuttz is offline   Reply With Quote
Old 04-08-2008, 06:26 PM   #2
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

On your gdform.asp

put the following code to the top of your page:

Code:
 <% ' debugging code ******************************************************************************
 FOR EACH Form_Parameter IN Request.Form
  Response.Write(Form_Parameter & "&nbsp;" & "=" & "&nbsp;")'this are the field names
  Response.Write(Request.Form(Form_Parameter) & "<BR>")' this are the data entered
 NEXT
 'debugging code ******************************************************************************
 %>
That code will let you know what are the values passed from your form. Is this going to a DB or just a page, or email once it's processed??

What is the gdform.asp code like???
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 04-08-2008, 09:03 PM   #3
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default

Code:
<% ' debugging code ******************************************************************************
 FOR EACH Form_Parameter IN Request.Form
  Response.Write(Form_Parameter & "&nbsp;" & "=" & "&nbsp;")'this are the field names
  Response.Write(Request.Form(Form_Parameter) & "<BR>")' this are the data entered
 NEXT
 'debugging code ******************************************************************************
 %>
 <%
Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
host_url = Request.ServerVariables("HTTP_HOST")
req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("\ssfm")
dirname = filename
filename = filename & "\gdform_" & DatePart("M", dtNow) & DatePart("D", dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S", dtNow)
Function FormatVariableLine(byval var_name, byVal var_value)
 Dim tmpStr
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
 tmpStr = tmpStr & var_value & vbCRLF
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
 FormatVariableLine = tmpStr
end function
Sub OutputLine(byVal line)
   outfile.WriteLine(line)
end sub
if err.number = 0 then
 Set outfile = fso.CreateTextFile(filename, true, false)
 if err.number <> 0 then
   bErr = true
   errStr = "Error creating file! Directory may not be writable or may not exist.<br>Unable to process request."
 else
  if(req_method = "GET") then
   for each Item in request.QueryString
    if item <> "" then
     bEmpty = false
     key = item
     value = Request.QueryString(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
     end if
    end if 
   next
  elseif (req_method = "POST") then
   for each Item in request.form
    if item <> "" then
     bEmpty = false
     key = item
     value = Request.form(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
     end if
    end if 
   next
  end if
  outfile.close
 end if 
 if(bEmpty = true) AND errStr = "" then
  bErr = true
  errStr = errStr & "<br>No variables sent to form! Unable to process request."
 end if
 if(bErr = false) then 
  if (landing_page <> "") then
   response.Redirect "http://" & host_url & "/" & landing_page
  else
   response.Redirect "http://" & host_url 
  end if
 else
  Response.Write errStr
 end if 
 set fso = nothing
else
  Response.Write " An Error Occurred creating mail message. Unable to process form request at this time."
end if
%>
Here is the asp code from godaddy.

I am wanting a form to be submited our default email address, so we know when someone is interested something we offer.

Thanks

Last edited by Nuttz; 04-08-2008 at 09:19 PM..
Nuttz is offline   Reply With Quote
Old 04-08-2008, 09:05 PM   #4
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default

posted twice by acident....sorry
Nuttz is offline   Reply With Quote
Old 04-09-2008, 06:42 PM   #5
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

It's more involved than I thought.

Did you try changing the Enctype on your form from:

enctype="text/plain" to enctype="multipart/form-data"
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 04-10-2008, 02:49 AM   #6
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default

I just tried it and still same error code: No variables sent to form! Unable to process request.

Man is this frustrating....I'm getting to the point that I would pay someone to fix/figure it out.
Thanks
Nuttz is offline   Reply With Quote
Old 04-11-2008, 05:12 AM   #7
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

what are you trying to accomplish exactly????
Is the form posting to a page or sending it to you as email. The code you have posted has all kind of functions for error handling as well as file uploading. The script you have may not be what you want.

so, what do you want the form to do for you?

I think that should have been my first question. before I even sent my first reply, but I have been very busy that I got caught in the panic.

It happens.

I decided to see what Godaddy was and I found this on my first search: http://forevergeek.com/articles/godaddy_sucks.php
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu

Last edited by mangofreak; 04-11-2008 at 05:18 AM..
mangofreak is offline   Reply With Quote
Old 04-11-2008, 12:26 PM   #8
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default

What I am wanting the form to do is....once you enter the information(name, email, and comments) then click the submit button. It would then send an email to me at info@precision-design.net letting me know that that person has a question or comment.

Thatís what I want it to...If that is possible, or if you know of another way for a user to submit the form and I recieve it somehow.

I really do appreciate your time, thank you very much.
Nuttz is offline   Reply With Quote
Old 04-14-2008, 03:17 AM   #9
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

Sorry man, I have been as swamped as I can be. Pretty much the whole past week. Just now I had a chance to review your code more in detail so
Here are a few suggestions:

change your code from:
Code:
<form action="gdform.asp" method="post" enctype="text/plain" name="precision_form" target="_self" id="precision_form">
to
Code:
<form action="gdform.asp" method="post" name="precision_form" id="precision_form">
if still doesn't work, create a new page. Call it whatever you like and change that action of the form to the name of the new page you are creating. Then,
paste the debugging code I sent before (on the new page) in code view, in between the body tags or at the very beginning just below the
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> code bit.

then upload the files and test, you should be able to see if your new page receives the data passed from the form.

keep me posted. I'll be checking the forum tomorrow for updates.

second: If you don't have time, invest in a little application called FormstoGo, cheap but works for sending mail with asp and php, as well as validates the form. They also provide lifetime updates for their product. Google it FormstoGo from bebosoft. Nice stuff. cheap. worth it.
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 04-14-2008, 02:38 PM   #10
Nuttz
 
Join Date: Apr 2008
Posts: 11
Default

That worked....THANKS A MILLION!

the only thing is when my form submits it brings up an OOPS page from the server. Do I need to make a page that says.... Form has been submitted?

Thanks
David
Nuttz is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com