Web Analytics Made Easy -
StatCounter Registration - CodingForum


No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • Registration

    Hey, I was just wondering if there are any tutorials that are about making a registration/login/password system, I need one for my site. Some people have told me that I should use PHP... is that a good choice? Also, if I did use PHP, do I have to run my own server? I like the things PHP has to offer, but I'm not technical enough yet to get into running my own server. Can I use PHP as a client side script? Thanks!

  • #2
    No, PHP is server-based.

    Any half-way decent authentication script will be server-side.

    check http://www.hotscripts.com/PHP/Script...ion/index.html

    No, you don't have to run your own server. Whatever webhost you have does need to support PHP, however.

    The best client-side script I've seen thus far, redirects users to a page that has the file name "<username>and<password>.htm", though that can be a bit....overloaded.

    As for making the auth system....it breaks down into this (very basic):

    1. Get username & password from form
    <form action="authenticate.php" method="post">
       <input type="text" name="user" /><br/>
       <input type="password" name="pass" /><br/>
    2. Compare username & password with stored username/password

    PHP Code:
    /* You can get user info from text files, databases, or even store them here, in the script! */

    $username "test";
    $password "pass";

       if ((
    $_POST["user"] == $username) && ($_POST["pass"] == $password)) {
    /* do something good  */
    } else {
    /* do something bad  */
    3. Do something with info (see good/bad above): like redirect to a "Welcome" page, store session/cookie info, etc.