One registration form?
Results 1 to 7 of 7

Thread: One registration form?

  1. #1

    One registration form?

    I have phpBB, Coppermine Photo Gallery, and phpOpenChat. I want to be able to make one registration form so that when some one registers its not just for one section of my site, but for all of them. I was wondering how to do this if anyone can please help me.

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    They are all completely different systems. That would be a really tough hack requiring tons of changes if you were to do it. I would say you're out of luck unless it has already been done. Or maybe I'm overcomplicating it. If you had one big form with all the info you would need for all of them, and you knew where it had to go, I guess you could make a little script to insert the appropriate info for all 3 systems. Start searching around to see if it has already been done, and good luck if you attempt it . I wouldn't want to.

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Posts
    1,024
    I don't know much about programming but couldn't he like make a registration form, and copy where the stuff went from there original registration forms? Like say the photo gallery sent stuff to /home/john/blah.cgi, the phpbb went to /home/john/phpbb/asdf.cgi, couldn't he make a registration form that was like /home/john/phpbb/asdf.cgi ; /home/john/blah.cgi? I may just be blabbing since I don't know shiz about PHP but I'm just trying to help.
    [H]ard|OCP <--Best hardware/gaming news out there--|
    pwned.nl <--Gamers will love this one --|
    Light a man a fire and you\'ll keep him warm for a day, Light a man ON fire and you\'ll keep him warm the rest of his life.

  4. #4
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    I'm not sure that you can send all the information to 3 different places at once, and even if you could I'm sure all 3 scripts are looking for different names on the variables coming in. I could be wrong though. I'm pretty sure you'd have to make one script that does everything all 3 of them would do but with just the one. If you had some good php experience I'm sure it can be done. I hope you pull it off.

  5. #5
    Senior Member
    Join Date
    Aug 2001
    Posts
    251
    I think that you're making it out to be slightly more difficult than it really is..., but still it would take some PHP programming knowledge.

    I wouldn't bother writing a script to do all the processing, I'd write a script to break apart the forms contents into a way that each application's registration script can do the processing for you. Why reinvent the wheel when you can just use a bunch you have lying around waiting to be used?

    It might be a little tricky but it would be easier than re-doing all the input validation.
    All it really will take is figuring out what each individual script expects as input. I'd start by going to each registration page and going to 'view as source' and see what the form is outputting. Once you right that down you'll know exactly what each script expects in its $_POST or $HTTP_POST_VARS to function properly.
    I'd think the easiest way would to be take the $_POST array you receive from your script and stick it in a $temp_array, then copy what you need back out to eht $_POST array and call the respective script's registration page (like coppermine's regsiter.php). That way you shouldn't even have to edit the applications themselves, you'll just be using their relatively well developed and stable code to your advantage and saving yourself a lot of coding.

    That's just my thoughts.
    Ciao,
    Dhej
    The owl of Minerva spreads its wings only with the falling of dusk. -Hegel

  6. #6
    Thanks for some ideas that gave me and my friend some ideas. I really like the sound of Dhej's idea.

  7. #7
    Senior Member
    Join Date
    Aug 2001
    Posts
    251
    That's because it's the lazy solution. :-P

    Often with programming though, the lazy solution is the best solution. Why spend days working on something when the tools are at your disposal to do it in hours?

    Of course it's less of a short term lazy and more of a long term laziness. More work in the short term pays of in when you get to use that chunk of rock solid reusable code to complete a project before a deadline.

    In this case its even better because someone else made all the reusable code, and you just get to plug right in.
    If I weren't in the middle of a project I'd offer more help, but as it is, I really shouldn't even be posting right now. Resumes to send out, a database interface class to knock the bugs out of, then implementation of all the libraries I've written into a beautiful new code-base for the site that was in my signature so that I don't shudder every time I peek at its code.
    (Funny how something you wrote a year ago can turn your stomach. I don't think that there is a single bit of
    reusable code in the entire thing..., but that will change MUAHAHAHA.)

    Ciao,
    Dhej
    The owl of Minerva spreads its wings only with the falling of dusk. -Hegel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •