Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Tags for this Thread

+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Sultan's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Sep 2009
    Posts
    23
    Downloads
    0
    Uploads
    0

    I want to redirect my website users to member.php page right after logged in.How

    can I code it? I want to redirect my website users to member.php page right after logged in.How can I code it?

    HTML SYNTAX FROM INDEX.PHP

    <html>
    <form id='para' action='login.php' method='POST'>
    <table>
    <tr>
    <td><p>
    <p>
    Email<br>
    <input name='email' type='text' size="20" />
    </td>
    <td><p>
    <p>
    Password<br>
    <input name='password' type='password' size="20" />
    </td>
    <td>
    <br><p>
    <p>
    <input font='Bookman Old Style' type='submit' value='Log in' />
    </td>
    </tr>
    </table>
    </form>
    </html>

    PHP SYNTAX LOGIN.PHP

    <?php
    session_start();
    $username = $user = (isset($_POST['username'])) ? $_POST['username'] : '';
    $password = $user = (isset($_POST['password'])) ? $_POST['password'] : '';
    if ($username&&$password)
    {
    //connection to mysql
    $connect = mysql_connect("localhost","root","") or die("Couldn't connect..");
    //connecting database
    mysql_select_db("phplogin") or die("Couldn't find db");
    //selecting data from table
    $query = mysql_query("SELECT * FROM users WHERE username='$username'");
    //checking username
    $numrows = mysql_num_rows($query);
    if ($numrows!=0)
    {
    while ($row = mysql_fetch_assoc($query))
    {
    $dbusername = $row['username'];
    $dbpassword = $row['password'];
    }
    //check to see if they match
    if ($username==$dbusername&&md5($password)==$dbpasswo rd)
    {
    echo "You are logged in $username. <a href='user.php'>Click here</a> to enter the member page.";
    $_SESSION['username']=$dbusername;
    }
    else
    echo "Incorrect password..";
    }
    else
    die("That user doesn't exist");

    }
    else
    die("Please enter a username and password.");

    ?>

  2. #2
    softbestoem
    softbestoem's Avatar
    Guest
    [align=center]You can buy cheap other pills in our shop:[/align]
    buy Abbey Road TG Mastering Pack 1.0.2 ,URSoft Your Uninstaller Pro 7.0. software licenses
    buy Abbey Road TG Mastering Pack 1.0.2 ,URSoft Your Uninstaller Pro 7.0. serial
    Abbey Road TG Mastering Pack 1.0.2 ,URSoft Your Uninstaller Pro 7.0. buy cheap

  3. #3
    softbestoem
    softbestoem's Avatar
    Guest

    Adobe Illustrator CS3 ,Proxy Networks PROXY Pro Master 6.1.

    [align=center]You can buy cheap other pills in our shop:[/align]
    buy Adobe Illustrator CS3 ,Proxy Networks PROXY Pro Master 6.1. software licenses
    buy Adobe Illustrator CS3 ,Proxy Networks PROXY Pro Master 6.1. serial
    Adobe Illustrator CS3 ,Proxy Networks PROXY Pro Master 6.1. buy cheap

  4. #4
    softbestoem
    softbestoem's Avatar
    Guest

    Abbyy FineReader Professional 10.0.102 ,A73 Piano Station 1.1.

    [align=center]You can buy cheap other pills in our shop:[/align]
    buy Abbyy FineReader Professional 10.0.102 ,A73 Piano Station 1.1. software licenses
    buy Abbyy FineReader Professional 10.0.102 ,A73 Piano Station 1.1. serial
    Abbyy FineReader Professional 10.0.102 ,A73 Piano Station 1.1. buy cheap

  5. #5
    softbestoem
    softbestoem's Avatar
    Guest

    SyntEvo SmartSVN 6.6 Enterprise ,Mediatox Aurora MPEG To DVD Burner 5.2.

    [align=center]You can buy cheap other pills in our shop:[/align]
    buy SyntEvo SmartSVN 6.6 Enterprise ,Mediatox Aurora MPEG To DVD Burner 5.2. software licenses
    buy SyntEvo SmartSVN 6.6 Enterprise ,Mediatox Aurora MPEG To DVD Burner 5.2. serial
    SyntEvo SmartSVN 6.6 Enterprise ,Mediatox Aurora MPEG To DVD Burner 5.2. buy cheap

  6. #6
    softbestoem
    softbestoem's Avatar
    Guest

    4Videosoft TS Converter 3.2.06 ,Aurora 1.15 for Photoshop CS2.

    [align=center]You can buy cheap other pills in our shop:[/align]
    buy 4Videosoft TS Converter 3.2.06 ,Aurora 1.15 for Photoshop CS2. software licenses
    buy 4Videosoft TS Converter 3.2.06 ,Aurora 1.15 for Photoshop CS2. serial
    4Videosoft TS Converter 3.2.06 ,Aurora 1.15 for Photoshop CS2. buy cheap

  7. #7
    softbestoem
    softbestoem's Avatar
    Guest
    [align=center]You can buy cheap other pills in our shop:[/align]
    buy Adobe Photoshop CS3 Extended ,Excel Save Each Sheet As Separate Excel File Software 7.0. software licenses
    buy Adobe Photoshop CS3 Extended ,Excel Save Each Sheet As Separate Excel File Software 7.0. serial
    Adobe Photoshop CS3 Extended ,Excel Save Each Sheet As Separate Excel File Software 7.0. buy cheap

  8. #8
    softbestoem
    softbestoem's Avatar
    Guest
    [align=center]You can buy cheap other pills in our shop:[/align]
    buy Microsoft Windows XP Pro Corporate x64 ,Music Organizer Deluxe 3.3. software licenses
    buy Microsoft Windows XP Pro Corporate x64 ,Music Organizer Deluxe 3.3. serial
    Microsoft Windows XP Pro Corporate x64 ,Music Organizer Deluxe 3.3. buy cheap

  9. #9
    undosyncsyday
    undosyncsyday's Avatar
    Guest

    Hello all

    Hello to all users of this forum.

 

 

Quick Reply Quick Reply

Click here to log in


What color is our footer?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. php - No users logged in, would you use a session?
    By phillymac78 in forum Discuss PHP
    Replies: 1
    Last Post: 02-21-2010, 11:25 PM
  2. PHP Code for a Website Member Profile Page?
    By Steven W in forum Discuss PHP
    Replies: 0
    Last Post: 10-22-2009, 08:48 PM
  3. How to redirect a page in PHP?
    By Sasuke23 in forum Discuss PHP
    Replies: 0
    Last Post: 06-13-2009, 12:06 PM
  4. Replies: 0
    Last Post: 01-10-2009, 12:40 AM
  5. users logged in or not in php?
    By jack in forum Discuss PHP
    Replies: 0
    Last Post: 12-10-2008, 11:37 PM

Bookmarks

Posting Permissions

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