Click to See Complete Forum and Search --> : Passing user-pass from html 1 into html 2


rvazquez
04-23-2008, 05:43 AM
WAY 1
one.html includes two ‘variables’:
* this.form.elements.user.value
* this.form.elements.pass.value

at some point, one.html executes this:
* window.location='two.html';

this switches to a new html, in which I’d like to access:
* this.form.elements.user.value
* this.form.elements.pass.value

WAY 2
I want to pass from an initial user-pass html screen to a second html screen in which I can access to user and pass. How can I do this easily?

ruben

PS: I hesitated on where to post this, so picked up 3 best candidates (html, js, php).

Fang
04-23-2008, 05:59 AM
Ideally PHP; the form values are posted to the server script which generates hidden elements in the second document.

Please don't x-post. A mod. will move your post if necessary

ray326
04-23-2008, 10:27 PM
Two options:
1. Use a server side tool (PHP, ASP, JSP) that supports sessions and store them in the session.
2. Use Basic Authentication and the browser will send them in an authorization header with every request.