Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


what is wrong with this form request?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,182
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> what is wrong with this form request?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 what is wrong with this form request? - 6/18/2001 4:19:44 AM   
  pia

 

Posts: 13
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
hi all,

ive tried and tried to pull this form entry into a database update and
it just wont work. if i take the variable "ns" and make it an actual
text string, the update works fine...but if i use a
"request.form("theformobjectnamehere") it wont pull. please help!
thanks! here's my code:

<%@ LANGUAGE = VBScript %>
<html>

<head>
<title>moongroover editor</title>

<%
Dim DataConn
Dim CmdUpdateRecord
Dim MYSQL
Dim ns
Dim edited

Set DataConn = Server.CreateObject("ADODB.Connection")
Set CmdUpdateRecord =
Server.CreateObject("ADODB.Recordset")

DataConn.Open "DBQ=" & Server.Mappath("../data/bios.mdb")
& ";Driver={Microsoft Access Driver (*.mdb)};"


edited = request.querystring("groover")
ns = request.form("instruments")

MYSQL = "SELECT instruments FROM bios WHERE
groover="&edited

CmdUpdateRecord.Open MYSQL, DataConn, 1, 3

CmdUpdateRecord.Fields("instruments") = ns
CmdUpdateRecord.Update

CmdUpdateRecord.Close
Set CmdUpdateRecord = Nothing
DataConn.Close
Set DataConn = Nothing
%>

</head>

<body>
<center>Good job
<%=edited%>!!</center><br><br><%=ns%>
</body>
</html>
 
 
Post #: 1
 
 Re: what is wrong with this form request? - 6/18/2001 4:20:41 AM   
  dougc

 

Posts: 12
Score: 0
Joined: 5/31/2001
From: USA
Status: offline
I'm not entirely certain what you're trying to do, but request.form
and request.querystring are different ways to get info back from a
submitted page. Use form if sending by "Post" and use Querystring
if sending by "Get". These are both ways to get info back from
your <input> items, but I don't believe you can use both in the
same page. If you're are getting info back in request.querystring,
you can place your "name="instruments"" input outside of a "form"
section and have it returned in the querystring. Otherwise, put your
"name=groover" input inside the form (with the instrument input)
and use a submit input to send them both in the request.form string.

I don't know if I'm being clear, but hopefully this gets you a little
less stuck. Let me know if you'd like more elaboration.

(in reply to pia)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> what is wrong with this form request? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts