PDA

View Full Version : onSubmit to call a function and another script


sybaritic_life
12-26-2002, 11:21 PM
I have a form that login a user for the main site, but I'd also like to pass the the same userid & password to another script that logs the uesr into a discussion board.

This is what I have in my form to log them into the main site:
<form action='<?PHP echo $documentLocation; ?>' METHOD="post" onSubmit="return checkData()">

How would I activate the other script? Would this work?

on Submit="return CheckData() && http://www.site/login.php?username&password"

whammy
12-27-2002, 12:01 AM
Is that discussion board under your control, i.e. on a server you host?

If so I can think of a couple of different approaches you might take - not sure of the php syntax though... if it's on the same domain (which from your post I'm assuming it isn't), you could just use a cookie.

sybaritic_life
12-27-2002, 04:45 PM
Yes, that forum is under my control. I'm using phpBB.
I was thinking of just invoking the discussion board login script by passing it the two values it needs; the script itself uses cookies to store the information.

I'm just not sure of the syntax to use.