Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67896?pagenum=1
05 November 2025, 15:51
Topic
MarcelG
One page, one form, two postpages
22 November 2008, 06:43
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. <
Replies ...
ruirib
22 November 2008, 08:00
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?<
Etymon
22 November 2008, 12:05
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.<
MarcelG
24 November 2008, 03:10
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.<
ruirib
24 November 2008, 06:40
If it's just the registration, it could be handled easily, if the MySQL server allows outside connections. Does it allow that?<
MarcelG
24 November 2008, 07:59
Mmmm...I guess it does, as it is a different server than the one serving the PHP page.
How can I check that?<
ruirib
24 November 2008, 08:04
You can try to use something like SQLYog to connect to the DB and see if it works.<
MarcelG
24 November 2008, 09:36
Ah, like that...that makes sense.
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.<
Podge
24 November 2008, 10:14
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.<
MarcelG
24 November 2008, 11:23
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.<
balexandre
24 November 2008, 19:40
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.
<
pwhitehurst
24 November 2008, 20:05
Hi,
If the PHP accepts remote connections then you can write the connection string in ASP.
For instance
dim adoConn
dim adoRS
set adoConn = Server.CreateObject("ADODB.Connection")
set adoRS = Server.CreateObject("ADODB.Recordset")
adoRS.ActiveConnection = adoConn Also depends on whether the directory the mysql database resides in is visible on the Internet via the domain address (not recommended for security reasons).
Cheers
Phil<
MarcelG
25 November 2008, 06:25
I've been forced to do it differently, as it does not end with just the insertion into the MySQL database ; the user folders need to be created too, and that's part of the registration process in PHP.
So, I've now done it manually : the registration page on storage.oxle.com is gone, and redirects to the oxle.com registration page. After the registration is complete, the account is manually created on storage.oxle.com by me, and the hashed password is inserted into the db using a simple script. I've tested it, and it works great.
Not as nice as I wanted it to be, but it'll do the trick.
Thanks for all the suggestions! <
ruirib
25 November 2008, 07:05
Well, after the DB insertion from oxle.com, you could retrieve the member ID and redirect to a page on storage that would get that ID and create an appropriately named folder. Of course, this last part would require you to do it in PHP...<