|
|
Joined: Dec 2004
Posts: 2
Lurker
|
|
Lurker
Joined: Dec 2004
Posts: 2 |
Trying to login users to both my main site and Threads with one form. I found a couple of posts suggesting this is possible, but ran into this problem:
If I put a form on my main site (on a different server) that sends the correct parameters to start_page.php then this works and I am logged in.
However, if I auto-submit the exact same form, using javascript submit() then it will not work - I get the error: "All of the required fields are not filled in."
I also tried adding a hidden field type="hidden" name="buttlogin". start_page.php tests for the presence of this field to perform the login. But again, with auto submit, it still doesn't work.
Anyone got any ideas what might be the issue here?
|
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Is the javascript method using POST? or GET? If it's using GET then the varaibles may be getting lost. In start_page.php you could find this section: <br />$Cat = get_input("Cat","post");<br />$Loginname = get_input("Loginname","post");<br />$Loginpass = get_input("Loginpass","post");<br />$firstlogin = get_input("firstlogin","post");<br />$buttlogin = get_input("buttlogin","post");<br />$Email = get_input("Email","post");<br />$buttforgot = get_input("buttforgot","post");<br />$rememberme = get_input("rememberme","post");<br />$form = get_input("from","post");<br />Change the method "post" to "both" for each variable, and see if that helps. 
|
|
|
|
|
Joined: Dec 2004
Posts: 4
Lurker
|
|
Lurker
Joined: Dec 2004
Posts: 4 |
I've been trying to get this to work as well, and have been having the same problem. I've done a bit of playing around with things and have found that the variables actually survive the POST method, however when [ubbt.inc.php]'s function do_login(...) is called, the variables seem to disappear.
When I make a test page to work with the POST variables, I echo them fine. But when I add the do_login function below my echo statements, they echo back nothing!
I assume that this may be caused by the codes in [ubbt.inc.php] around line 32, where it appears to protect various variables. I don't want to remove those lines, because I'm sure that would open many security holes in my UBB.
|
|
|
|
|
Joined: Dec 2004
Posts: 4
Lurker
|
|
Lurker
Joined: Dec 2004
Posts: 4 |
With further examination, I've found that line 1267: header(sprintf("Location: %s", $_SERVER['REQUEST_URI']));is responsible for the variable loss. The reason? I have no idea. But with that line taken out, everything seems to work fine. Now, I did not delete that line from the file itself, but rather copied the function to my custom do_login.php. Then I replaced all of the $this variables to $html, since I removed the function from the 'html' class.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,957
Members13,826
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 6013
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 14
|
|
|
|