/    Sign up×
Community /Pin to ProfileBookmark

Passing user-pass from html 1 into html 2

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).

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 23.2008 — 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
Copy linkTweet thisAlerts:
@ray326Apr 24.2008 — 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.
×

Success!

Help @rvazquez spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...