Posted by Tom on 11/03/06 03:08
I have a function that restricts access to a page to logged in users.
When a user who isn't logged in goes to the page, it will dynamically
generate a login form.
I'm trying to use it in conjunction with the free shared SSL
certificate offered by my host. To use SSL, you would change a URL
like this
http://mydomain.com/page.php
to
https://ssl.myhost.com/mydomain.com/page.php
My problem: when my script dynamically generates the login form, it
uses the $_SERVER['PHP_SELF'] value in the action field. But this ends
up being '/page.php' rather than '/mydomain.com/page.php' so my form
gets submitted to
https://ssl.myhost.com/page.php
instead of
https://ssl.myhost.com/mydomain.com/page.php
Simple I thought, I'll just use the SERVER or ENV variable that gives
me the full url. My problem: it doesn't seem to exist!
Anyone have any suggestions? Anyone else confront and solve this
issue?
Thanks,
Tom
[Back to original message]
|