473,373 Members | 1,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,373 software developers and data experts.

carry over info from one .html page to another (overcome statelessness?)

2
Hi!

this must be a stupid question, but bare with me - I just started learning html!

My problem:
I have several html pages that use forms to collect user input.
On each page, submitting the data activates a cgi script that saves it to my server and then forwards the user to another html page.

I would like to carry a hidden variable (i.e., the user ID that someone entered on the first page) forward through all html pages, so that I can later link all the data submitted by the same user on the different pages. I do not want the user to input their id into a textbox on every page.

I realize that html is stateless, and that I can overcome this by having all pages be generated by a cgi script. However, what do I do if that is not a good option for me (i.e., after the cgi script is executed, the user should be forwarded to an html page, which only executes a new cgi once the data on that page gets submitted). I also do not want to /cannot use cookies for this.

Is there any way? Please help!

Thanks a lot,

as_sass
Oct 4 '07 #1
4 2683
Why don't you just use PHP, thats probably the best way
Oct 4 '07 #2
drhowarddrfine
7,435 Expert 4TB
Why don't you just use PHP, thats probably the best way
Perhaps he is. He's using CGI which can be used with any programming language.

Using a hidden 'id' as you described is a frequent solution, as are cookies if possible. Another possibility is adding a user id onto the url when forms are submitted or the links.
Oct 4 '07 #3
sass
2
Thanks for the help!
I am not using PHP, and I was trying to avoid cookies.

However, I think I figured something out based on your suggestion:

Visitors will enter their id into a form field on the first page, and from thereon out this will get appended to the URL (e.g., www.domain.com/linkhere.html?12345).
As far as I figured out, the linkhere.html should still work even if I append numbers to it with a question mark, right?

then I can save the referer using a cgi-script and extract the id from it.
Now I just need to figure out how to extract the last five characters of the referer.
Any ideas?

Thanks SO much!

as
Oct 5 '07 #4
drhowarddrfine
7,435 Expert 4TB
A problem could occur with the .html extension. Your server will probably see the .html extension and look for a html page but ignore the rest. But this should all be handled with your server side script anyway and can automatically insert the 'user id' rather than make the viewer do that. The submitted for would be sent to the server side script to be handle and shouldn't have a .html extension anyway.
Oct 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kenshin | last post by:
Hey! I have another script where i pull all the information from the database and I want to send it to the person. What they do is they enter in their email, and if the email matches, than it will...
4
by: Paul | last post by:
Hi, I'm wondering if someone out there can help me overcome this quandary. I need to be able to calculate the height of the current page. I need to calculate the height of the page in pixels after...
1
by: David | last post by:
Hi, I have an ASP page with a form and the following code: ..... type=Radio Checked name=selectserial value=" & RS("PSL_F_Serial")..... Tis will carry over the value of RS("PSL_F_Serial"),...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
6
by: matt | last post by:
hello, i am having trouble doing something. when a user triggers a certain event in my app, i need to initiate another web request to one of my other webpages, programmatically. currently, i do...
3
chunk1978
by: chunk1978 | last post by:
hi there... i'm trying to make one text field contain the value of another... i'm assuming there's a really simple solution... here's a code i quickly wrote to further explain my issue: ...
4
by: charles | last post by:
I used a web service (or dll) to create a socket/send some data in a thread within a function in a page. After this operation, the operation in this page continues. This approach works when the...
5
by: phpmagesh | last post by:
Hi All, I have html page, in that i have some flash header. In that flash header i have sound on/off function. i implemented this in my html page. but i need some modification in this. now it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.