...

View Full Version : combining php scripts



magnus127
04-22-2003, 12:32 AM
I'm still pretty new to php....trying to figure it out though.

I have several different PHP/MySql scripts downloaded free or paid for off the net. I want to make them all come together into one service, so people don't have to sign up over and over all the time. Most of them have a config.php file where I have to manually change my database info, and then the scripts call that to function.

Now here's my question:
Could I use the same database for each, and just change the individual table information to match through all of them?

Dylan Leblanc
04-22-2003, 12:53 AM
You have several programs which require a user to login, but you want the user to only have to login once?

This can be a tricky thing to do. What programs do you have?

Spookster
04-22-2003, 12:57 AM
Of course you can use the same database. It might take a bit of work coming up with the necessary table(s) that deal with login/access to work throughout all of the scripts.

magnus127
04-22-2003, 01:24 AM
My main program is Postnuke, I use a Cpanel email user signup script from http://warwithboredom.com/scripts.htm so I can offer free email accounts, squirrelmail for the email client, and phpmanager for my webhosting service.

magnus127
04-22-2003, 01:31 AM
How about this....could I modify the signup script in postnuke to create accounts in my other scripts as well?

Spookster
04-22-2003, 02:28 AM
Originally posted by magnus127
How about this....could I modify the signup script in postnuke to create accounts in my other scripts as well?

If you modify one of the account/login/access tables to be able to work with all of the other scripts then you wouldn't need to have one script create accounts for all the other scripts.

magnus127
04-22-2003, 07:42 AM
Ok, so how do I tell a signup script to post to 3 or 4 different programs?

I really am new at php....if this were html, I'd say something like <form method=POST action=url>. How would you do that in php so it posts to all the scripts?

Spookster
04-22-2003, 07:59 AM
Originally posted by magnus127
Ok, so how do I tell a signup script to post to 3 or 4 different programs?

I really am new at php....if this were html, I'd say something like <form method=POST action=url>. How would you do that in php so it posts to all the scripts?

I think you are not quite understanding what I am saying.

Ok each of those scripts are probably using a database table that stores users information such as username and passwords and other info for their accounts for that particular script. Since each script uses it's own table what you will want to do is design another table that stores usernames and passwords and other info that will accomodate any of the scripts. Then change each script to point to that new table.

magnus127
04-22-2003, 08:08 AM
ahh...the light just turned on. That shouldn't be too hard then, it's just a matter of figuring out what each script needs and pointing it to the new table.

Most of the time when I get a new script off sourceforge or hotscripts, it comes with a 'database.sql' file that's queried by MySql to populate my database. So, (in theory) I could use those to populate a single database with all the user info I'd need for each script?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum