473,327 Members | 2,007 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,327 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 2682
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.