Jump to content

[SOLVED] I need to know how to access a user's information using their ID. *EDIT*


Alecdude

Recommended Posts

<?php 
session_start(); // need this at the top of each page where sessions are used.
include 'dbc.php';

$full_name = mysql_real_escape_string($_POST['email']);

if ($_POST['Submit']=='Login')
{
$md5pass = md5($_POST['pwd']);
$sql = "SELECT id,full_name,Money FROM users WHERE 
            full_name = '$full_name' AND 
            user_pwd = '$md5pass'
         AND user_activated='1'"; 
         
$result = mysql_query($sql) or die (mysql_error()); 
$num = mysql_num_rows($result);

    if ( $num != 0 ) { 

        // A matching row was found - the user is authenticated. 
//       session_start(); 
      list($user_id,$full_name) = mysql_fetch_row($result);
      // this sets variables in the session 
      $_SESSION['user']= $full_name;  
      $_SESSION['user_id'] = $user_id;   
      if (isset($_GET['ret']) && !empty($_GET['ret']))
      {
      header("Location: $_GET[ret]");
      } else
      {
      header("Location: myaccount.php");
      }
      //echo "Logged in...";
      exit();
    } 

header("Location: login.php?msg=Invalid Login");
//echo "Error:";
exit();      
}

?>

I need this info ASAP. Not to be bossy or anything, but I have a deadline.

 

Pay someone to do it. It sucks for you to have a deadline, honestly not my problem.

 

But, I figured one of you guys would know how to, as I thought info like this would be pretty basic.

I need this info ASAP. Not to be bossy or anything, but I have a deadline.

 

Pay someone to do it. It sucks for you to have a deadline, honestly not my problem.

 

But, I figured one of you guys would know how to, as I thought info like this would be pretty basic.

 

Chances are many folks here can do it. But when a person starts saying "I need this asap" or "I need this by tomorrow" or any other variation of urgency, then we tend to not care. It is not our problem that you have a deadline and don't know how to do what your supposed to do.

 

We donate our time to help folks on here. If you need something that bad, then either wait until someone answers you or pay someone to do it, because again, your deadline is not our problem.

 

You did not even state what your second problem was.

 

Nate

I need this info ASAP. Not to be bossy or anything, but I have a deadline.

 

Pay someone to do it. It sucks for you to have a deadline, honestly not my problem.

 

But, I figured one of you guys would know how to, as I thought info like this would be pretty basic.

 

Chances are many folks here can do it. But when a person starts saying "I need this asap" or "I need this by tomorrow" or any other variation of urgency, then we tend to not care. It is not our problem that you have a deadline and don't know how to do what your supposed to do.

 

We donate our time to help folks on here. If you need something that bad, then either wait until someone answers you or pay someone to do it, because again, your deadline is not our problem.

 

You did not even state what your second problem was.

 

Nate

 

Sorry for my impatience.

And, the second problem is that I need to figure out how to access the user's information using the ID.

Again, sorry.

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.