Log in

View Full Version : Using username/password for other script


goregasm
08-19-2002, 06:45 PM
Hello,

I recently bought another license for a site of mine called goregasm.com . At goregasm.com i use a self written comment-, submission- and registerscript. I'm installing the VBulletin and i want to let the other scripts use the vbulletin usernames/passwords so visitors don't have to sign up seperately for both making comments and writing in the forum.
The problem is using the passwords from VB table user 'cause it's encrypted. Please help me out with this

Thanks!

goregasm
08-20-2002, 04:13 AM
Anyone?

Shepski
08-20-2002, 01:56 PM
it can be done but you will be sending unencrypted usernames and passwords across the network. i have done it with no problems.

in the register.php script look for :


mail ($newuseremail,$subject,$message,"From: \"$bbtitle Mailer\" <$webmasteremail>");


round about line 500

then after that but before the } insert the following code to connect to the other database, dump the details into it :


//Code added to enter details into another database
mysql_connect("serverip", "dbusername", "dbpassword");
mysql_select_db("databasename");
mysql_query("INSERT INTO put_your_table_here VALUES ('', '', '$password', '$username', '$email', '', '', '', '')");
//Code Finish


Obvioulsy, the insert into command needs customising to your table depending how many fields you have.

Hope this is what you needed .