Where is login details in MySQL database?

Started by General Xbox Gaming, August 28, 2014, 09:47:07 PM

Previous topic - Next topic

Ninja ZX-10RR

You have so many things to do... I wonder if you will go crazy on them :( I will wait... Any clues about when you will be able to give it a look?
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

General Xbox Gaming

Got something that works:
<?

/* SMF */
require "../Settings.php";

$user  = $_REQUEST['user'];
$pass = $_REQUEST['pass'];


mysql_connect($db_server, $db_user, $db_passwd);
        mysql_select_db($db_name);
       
        $result = mysql_query("SELECT * FROM `".$db_prefix."members` WHERE `member_name` = '$user'");
       
        if($result == false){
                die("User not found!");
        }

$row = mysql_fetch_row($result);
       
        /* Username */
        $username = $row[1];
       
        /* Date Joined
        $date_registered = $row[2]; */
       
        /* Post Count */
        $post = $row[3];
       
        /* Group */
        $group = $row[4];
                /* if($Group_result == "1")
                        $group = "Administrator";
                Else if ($Group_result == "2")
                        $group = "GlobalModerator";
                Else if ($Group_result == "3")
                        $group = "Moderator";
                else
                        $group = "Member"; */
                       
        /* Last online */           
        $last_login = $row[6];
       
        /* Real Name */
        $Real_name = $row[7];
       
        /* passwd_result */
        $passwd_result = $row[16];
       
        /* Gender
        $gender_result = $row[20];
                if($gender_result == "1")
                        $gender = "Male";
                Else if ($Group_result == "2")
                        $gender = "Female";
                Else
                        $gender = "N/A"; */
                       
                       
        /* $birthdate = $row[21]; */
       
        if($passwd_result == $pass)
$passw = "True";
else
$passw = "False";

        $Array = array(
                'Username' => $username,
                'RealName' => $Real_name,
                /* 'Gender' => $gender,
                'PostCount' => $post, */
                'UserGroup' => $group,
'PassResult' => $passw,
                /* 'JoinedDate' => $date_registered,
                'LastOnline' => $last_login, */               
                );

        $json = json_encode($Array);
       
        echo $json;           
 
/* SMF */
?>

But is this safe to use?

Kindred

as already stated... no... that will not be secure. The input is not cleaned...

and why would you require Settings directly?  EVER?


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Still insecure, still has ever single issue I outlined.

As for requiring Settings.php, that's all index.php and SSI.php do, that's fine.

Kindred

but shouldn't he require SSI and then use the standard SMF database function?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Well, yes, since that also makes the flood control available...

General Xbox Gaming

#26
Quote from: Arantor on August 30, 2014, 04:25:07 PM
Well, yes, since that also makes the flood control available...
When can you help me then?

I'm going to use this for the time being as the application isn't even ready for release yet. Also, SSL certificate might be a problem, I don't have the cash to get one. I have a family to feed and this is a side project that I'm working on with a friend.

General Xbox Gaming

Arantor can you help me with this please? I don't need a solution at this point but it would be nice if you can let me know if you can help me out.

Thank you.

Ninja ZX-10RR

He is working on a very complex and huge mod (http://www.simplemachines.org/community/index.php?topic=525210.0), he has *MANY* other things to do and the last thing he would like to see are people bugging him with please do please do things absolutely for FREE and since I am experiencing your same problem I don't want him to get upset for you bumping the topic with anxiety and consequently ignore this. So please, he said he will do it, thank him and post maybe in a month if it won't be done yet. I know that the paid modification he is working on will be over in about a month or so, then post in a month or so, not after five days :/ we are all volunteers in here and Arantor is the one doing more than anybody else, at least don't bug him will you? :)

As a foot-note... Don't take it personally, but imagine if a guy would come at you asking for a function of your forum and you have to code it, and after a few days comes again asking and asking expecting you to do it for him and delaying everything else in its favour. That's annoying. That's annoying even for me when people continuously ask me when my game will be released and I always answer please don't ask for ETA, I'm damn working on it. hope you got my point and you are not mad at me ;)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

General Xbox Gaming

Quote from: ♦ Ninja ZX-10RR ♦ on September 03, 2014, 10:24:38 PM
He is working on a very complex and huge mod (http://www.simplemachines.org/community/index.php?topic=525210.0), he has *MANY* other things to do and the last thing he would like to see are people bugging him with please do please do things absolutely for FREE and since I am experiencing your same problem I don't want him to get upset for you bumping the topic with anxiety and consequently ignore this. So please, he said he will do it, thank him and post maybe in a month if it won't be done yet. I know that the paid modification he is working on will be over in about a month or so, then post in a month or so, not after five days :/ we are all volunteers in here and Arantor is the one doing more than anybody else, at least don't bug him will you? :)

As a foot-note... Don't take it personally, but imagine if a guy would come at you asking for a function of your forum and you have to code it, and after a few days comes again asking and asking expecting you to do it for him and delaying everything else in its favour. That's annoying. That's annoying even for me when people continuously ask me when my game will be released and I always answer please don't ask for ETA, I'm damn working on it. hope you got my point and you are not mad at me ;)
I'm sorry if I came across as pushy in any way. I fully understand your points and I wasn't trying to push anything. I am sorry and I do understand that you have a lot on your plates.

General Xbox Gaming

#30
As I'm still in need of a solution for this topic, is there anyone with some free time to look into this again for use please?

Kindred

Why are you not just using the ssi functioms... Or the API?  Or even a hook?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

General Xbox Gaming

Quote from: Kindred on February 19, 2015, 06:21:08 PM
Why are you not just using the ssi functioms... Or the API?  Or even a hook?
Because I don't know how to call them or use them. I simply need a login for a C# program I am making and I don't know much about PHP & MySQL.
I need something like this but secure.

Advertisement: