Discussion Locked

get info. from one web page to another

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to pass a value from one web page to another on diferent servers. I tried submitting it by a form but was unsuccessful.need info quickly Help!!!!

5 replies

by gbworld

Not sure why you are having a problem with a form, but the only other option, without getting too deep is on the query string.

The problem may be that you are submitting to a page without code (like an HTML page). The only way to handle POST (form submit) or GET (query String) is to have some form of programming language (like ASP, JSP, etc.) handle the variables you pass from page to page.

For example, here is one in ASP:

Page 1:

Page 2:
<%
dim variable

variable = Request.form("variable")
%>

In JSP, the syntax is different, but the concept is the same.

The concept, in query string, is adding it to the URL instead of to the form collection, ie:

http://myurl.com/page.asp?variable=nothing

In ASP
<%
variable = Request.querystring("variable")
%>

Value would be nothing.

GB

by avramg

This is a common problem when deploying web applications in a load-balancing schema: You can't use Session Variables because they are server-based. You can pass via the method shown in the first answer, but this one method has been found to be very elegant:
Assuming you are coding in ASP (VB or cgi), you can create an SQL database for the purpose of passing variables. Before you call the next web page, write the variables in a database structure, using the session.ID to identify them. Passthe Session.ID on the post. The destination ASP used the Session.ID to retrieve the variables from SQL (and optionally) delete the entry when done.

This discussion is closed to new replies.