Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

truncated variables in a form

Status
Not open for further replies.

bletey

Programmer
Feb 26, 2001
5
GB
hi

when i submit a variable via a form, if the data has spaces in it , the data is truncated at the space ie name pete whitby, becomes pete, and my subsequent look up fails, has anyone any idea.

form sending data

<%
WHILE NOT orderHeader.EOF
Response.Write(vbNewLine & &quot;<TR><TD><input type=radio name=bollox value=&quot; & orderHeader(&quot;soNum&quot;) & &quot;></td><td>&quot; &_
orderHeader(&quot;soNum&quot;) & &quot;</TD><TD>&quot; &_
orderHeader(&quot;custRef&quot;) & &quot;</TD><TD>&quot; &_
orderHeader(&quot;coName&quot;) & &quot;<input type=radio name=cust value=&quot; & orderHeader(&quot;coName&quot;) & &quot;></TD><TD>&quot; &_
orderHeader(&quot;soID&quot;) & &quot;</TD><TD>&quot; &_
orderHeader(&quot;EfolderID&quot;) & &quot;</TD><TD>&quot; &_
&quot;</TD></TR>&quot;)
orderHeader.MoveNext
WEND
%>

results page

<% @ LANGUAGE=&quot;VBSCRIPT&quot; %>

<%

bolloxer=Request.Querystring(&quot;bollox&quot;)

custy=Request.Querystring(&quot;cust&quot;)

SQLSoNum=&quot;SELECT description, costEach, sellEach, margin, qtyOrd FROM order_Lines_tbl &quot;

SQLSoNum=SQLSoNum & &quot;WHERE soNum='&quot; & bolloxer & &quot;'&quot;

SQLCust=&quot;SELECT ACCOUNT_REF, ADDRESS_1, ADDRESS_2, ADDRESS_5, CONTACT_NAME, TELEPHONE FROM Customer_tbl &quot;

SQLCust=SQLCust & &quot;WHERE NAME='&quot; & custy & &quot;'&quot;

set conn = server.createobject(&quot;ADODB.Connection&quot;)

conn.open &quot;FILEDSN=C:\Tips.dsn&quot;

set orderLines=conn.execute(SQLSoNum)

set Customer=conn.execute(SQLCust)

%>

sorry about the variables but they are doing me head in.

Hopefully thanks in advance Bletey
 
how are you submitting your form? METHOD=GET? It should normally be METHOD=POST and then try request.form instead of request.querystring Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
Yeah, that's true. If you sent your variables in a URL (which is basically what happens when you use GET instead of POST), you should encode them so they won't get trunctated. Better though is to use METHOD=POST. hblackorgy is right.

<webguru>iqof188</webguru>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top