Jump to content

[SOLVED] encrypted password return


adam291086

Recommended Posts

hey

 

I followed a tutorial to create a login script. When i set the table up i set password to = PASSWORD and this encrypts all password in there. How do i go about returning the correct value of the password and not the encrypted on. The code below is what i have so far and it return the encrpted password

 

<?php
session_start();

// is the one accessing this page logged in or not?
if (!isset($_SESSION['db_is_logged_in']) 
   || $_SESSION['db_is_logged_in'] !== true) {

   // not logged in, move to login page
   header('Location: login.php');
   exit;
}

include 'config.php';



//button stuff
$search = $_SESSION['username'];

$result = mysql_query("SELECT * FROM  tbl_auth_user WHERE user_id ='$search' ") or die(mysql_error());
while($row = mysql_fetch_array($result))


{
  $home = $row['Home page'];
  $ryedale= $row['Ryedale Rumble'];
  $adam= $row['Adam'];
  $id = $row['user_id'];
  $password = $row['user_password'];
}
// user info

echo $id;
echo $password;
echo $home;
echo $ryedale;
echo $adam;


include 'closedb.php';

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.