Why should I rely on PHPJabbers.com for all my PHP scripting needs? What do you offer me when buying some script?
  • Top quality scripts
  • Full demo before buying
  • Best pricing
  • Script customization
  • 7 days a week support
  • Installation support
  • Secure buying
  • Create user login in PHP

    posted on 2006-10-03 22:05:11
    Comments
    dan posted on 2007-07-23 20:23:09
    Excellent script.

    Does anyone know how to give the script an individual url for each user to be redirected to upon login.

    Thanks for help!!!
    --------------------
    Veselin:
    you can create an array with redirect URLs

    $REDIRECT["username1"] = "http://www.url1.com";
    $REDIRECT["username2"] = "http://www.url2.com";
    $REDIRECT["username3"] = "http://www.url3.com";

    and in login.php after
    $_SESSION["logged"]=$_POST["username"];

    add this
    $temp = $_SESSION["logged"];
    header("Location: ".$REDIRECT[$temp]);
    --------------------
    Dan:
    thanks veselin!
    Im a noob when it comes to php! So in which file and where do i insert:
    $REDIRECT["username1"] = "http://www.url1.com";
    ....
    Thanks in advance!!
    --------------------
    Veselin: in passwords.php
    --------------------
    Dan: sorry. :( im such an idiot that i still cant figure out where to put it.... can you please be more specific?
    thanks again,
    --------------------
    Veselin: this is the file where your $USERS array is
    --------------------
    Dan: yer sorry.... i should have been more specific with my question!! lol.
    i know which file to put it into, but after which line of code should it be inserted?
    --------------------
    Veselin: right after $USERS array
    --------------------
    Dan: Is there something that i just dont understand? Ive inserted all of the code correctly yet still no joy? Do I need to enter any more code? noooob!!!
    --------------------
    Veselin: unfortunately, I cannot provide you with free help any more. My hourly rate is $50 and I can make the scripts work on your website

    Daysha posted on 2007-07-23 07:11:36
    Also, to echo Akshaye's question....is there a way to send an email and have a link on the page if they have forgotten their password?
    ---------------------------------
    PHPjabbers.com: we can make a forgot password feature for your script but it will cost $50

    Romu posted on 2007-06-27 20:17:33
    "For the redirect you can use header() function"

    When I change that, it redirects straight to chosen page (.htm) without asking any username or password. If I put therre .php-file, then I get the an error message from the browser, that the server in the address is redirecting endlesly. Please help..
    ------------
    Veselin: You need to redirect to a PHP file and put check_logged(); function at the top. Which file do you put the redirect into?

    David posted on 2007-06-18 01:54:13
    I see some issues above that are interesting to me as I keep getting similar issues. However I find it bad practice to post about the solution you found and yet NOT give the solution! You came here looking for help, did you ever think maybe you should return the favor you asked for when you first came and give the rest of us your solutions? Please be a good poster and leave your solutions next time.

    Akshaye posted on 2007-06-16 19:52:11
    Hi
    Kindly state how can I use the above User Log in and connect it to a MySQL database. Is it possible to have an email be sent if someone has forgotten his/her password?

    Thank you.

    Rgds

    whit posted on 2007-05-30 23:02:52
    thank you, that worked

    whit posted on 2007-05-30 22:20:42
    i put the 3rd part on a page i wanted protected and even if i am logged in, it redirects me to the login page and says \"you are logged in\"
    -----------
    Veselin: I changed check_logged() function and added an extra line there defining the global variables. Try it now

    axl posted on 2007-05-24 08:37:02
    Ok...ai manage to solve the problem, unortodox method but it works...good job for this tutorial...:)

    axl posted on 2007-05-23 23:18:50
    Please, can any body help me with: create a new script which deletes the user variable $_SESSION["logged"]='';
    I must tell that I'm graphic designer, I don't know nothing about PHP scripts :) ... pls & Thanks

    Charles posted on 2007-03-31 06:27:38
    I keep getting the following errors

    Warning: array_key_exists(): The second argument should be either an array or an object in /home/httpd/vhosts/domain.com/httpdocs/testblah/passwords.php on line 6

    Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/testblah/passwords.php:6) in /home/httpd/vhosts/domain.com/httpdocs/testblah/passwords.php on line 7

    and I am not exactly sure why. I am running php 4.3.2-39 and are there are at least 3 defined users in the array.

    Any help here would be appreciated and if there are specific php configuration i need to make sure is enabled in php.ini.

    Thanks

    Pages:   1 2 3 4 5 6 7
       
    If you have any additions, suggestions or modifications for this example please contact us or use the form below.
       
    Your name:
    Your email: (email address will not be posted on the web site)
    Comment:
    Verification