Instead of window.location, try document.formName.target = "file.php?params"
- that's how I have mine set up and it works well.
You need to follow that with document.formName.submit()

-Natalie

-----Original Message-----
From: Kris Vose [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 10, 2002 4:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] url string


I am looking for a way to pass two variables in a url string to a php
script.  I originally was using java script to acomplish this because once
the user is redirected they can not press the back button to get back to the
original page.  It looks like this: ?> <script> window.location =
"somefile.php?user=<?username?>&pass=<?userpass?>"</script>
<?

I have also tried it this way:

echo "<script> window.location =
'somefile.php?user=$username&pass=$userpass'</script>";

Unfortunately both ways do not work.  In the first instance the script jumps
to the window location but does not pass php variables into the url string.
In the second instances the java script does not even compile.

Is there a way to do this with php?...html?...javascript?

...I think that window.location does not except url string variables or
something.  Anyway if anyone can help it would be appreciated.  Thanks.


Kris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to