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
https://forums.phpfreaks.com/topic/78558-solved-encrypted-password-return/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.