One page, one form, two postpages - Posted (1106 Views)
Retired Support Moderator
MarcelG
Posts: 2625
2625
I hope what I want is possible, but I guess it'll be just something I have to live with.
Here's the deal: I have oxle.com, a Snitz forum, running on an Access database. I also have storage.oxle.com, a file storage facility based on PHP, using a MySQL database at a completely different hosting provider. I want to integrate the user registration for storage.oxle.com into the user registration process of the snitz forum at oxle.com.
The registration process for storage.oxle.com is extremely simple: http://storage.oxle.com/register
1 Username
2 password (+confirm)
3 e-mail address
4 two preference questions about allow mail and allow PM. 5 accepting the ToS

1,2 and 3 are also covered in the Snitz registration process. 4 can be removed. 5 is also included in the Snitz registration process. In other words, I already have all the information needed for registration on storage.oxle.com in the registration form of the Snitz forum. So, the question is: how can I enable the user to post that form to two pages, one being the Snitz page and the second being the Storage page. question<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
If they are on the same server, why don't you just add the code to add the info to the MySQL DB from Snitz?<
Posted
Advanced Member
Etymon
Posts: 2396
2396
I haven't done that before, but it seems like you can use one site to update the other. Create a second connection string on each site that points to the other database.
When you edit the first db from its hosting site, the same information also goes to the second db at it's hosting site and vice versa. The limitation being the encrypted password needs to be the same in both dbs or you need to carry both passwords in each db and do an "or" as in "this password or that password" selection when accessing the databases to enter or edit data. I'm not sure if your field names are identical either. That would be another issue.<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Unfortunately they're not on the same server ; Oxle.com is on IIS/Windows at Wiktel (USA), storage.oxle.com is on Apache/Linux, located at Servage (Denmark/Germany/UK). I'm now thinking of incorporating the second registration form in an iframe, with a seperate 'submit' button.
Perhaps that'll work.
I must admit I have no idea how to connect from the main server to the MySQL database at Servage....my PHP knowledge is pretty limited.<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
If it's just the registration, it could be handled easily, if the MySQL server allows outside connections. Does it allow that?<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Mmmm...I guess it does, as it is a different server than the one serving the PHP page. How can I check that?<
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
You can try to use something like SQLYog to connect to the DB and see if it works.<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Ah, like that...that makes sense. bigsmile Will try that tonight when I get home ; I'm behind a proxy at work at the moment, so I cannot do it from here.<
Posted
Support Moderator
Podge
Posts: 3776
3776
If it was me I would move both websites to a Windows host that allows php & MySql (very common nowadays). I would then upsize the Access DB to MySql and alter the form code so that both applications authenticate from the same member table.<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Well, too bad that's not an option, as I'm with Servage for one reason only: lots of space (510 GB) and lots of traffic (150 GB per day). The site that I run there is the storage site, and I cannot afford moving it to a Windows hosting provider.<
Posted
Junior Member
balexandre
Posts: 418
418
so Marcel, does your mySQL accept remote connections?
if not why not a simple PHP page that accepts a form post / get like

scriptUser
scriptPassword
snitzUsername
snitzPasswordEnc (you can encrypt the password using any kind of method and then decode it and save it ino the DB)
snitzWhateverValuesYouNeedMore

if the scriptUser and scriptPassword are the correct ones, just grab that info and INSERT into the mySQL DB.
smile<
You Must enter a message