SESSION; the following condition is possible or not????

5 views
Skip to first unread message

innocentumesh

unread,
Feb 2, 2013, 4:06:58 AM2/2/13
to phpgroup2...@googlegroups.com
if (isset($_SESSION['username']) && isset($_SESSION['user_password'])) {
$username = isset($_SESSION['username']);
$user_password = isset($_SESSION['user_password']);
} else {
$username = $_POST['username'];
$user_password = md5($_POST['user_password']);
}


innocentumesh

unread,
Feb 2, 2013, 4:17:11 AM2/2/13
to phpgroup2...@googlegroups.com
//file
login_process.php

innocentumesh

unread,
Feb 3, 2013, 12:30:49 AM2/3/13
to phpgroup2...@googlegroups.com
No feedback till now............. no problem...
...
No need to feedback / comment........................ I have solved my problem myself..................

Dhiraj Kumar Jha

unread,
Feb 3, 2013, 4:50:31 AM2/3/13
to innocentumesh, phpgroup2...@googlegroups.com

Hello Umesh,

With few modifications, the conditions might be applicable.

 

<?php

session_start();

if (isset($_SESSION['username']) && isset($_SESSION['user_password'])) {

            $username = $_SESSION['username'];

            $user_password = $_SESSION['user_password']; //assuming $_SESSION[‘user_password’] = md5($row[‘password’]); //in some other page

} else {

            $username = $_POST['username'];

            $user_password = md5($_POST['user_password']);

}

 

?>

 

Your intention was not clear though. Please elaborate if your problem is not resolved.

 

Cheers!

--
You received this message because you are subscribed to the Google Groups "PHPGROUP24BROADWAY" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpgroup24broad...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dhiraj Kumar Jha

unread,
Feb 3, 2013, 4:52:44 AM2/3/13
to innocentumesh, phpgroup2...@googlegroups.com

HI Umesh,

 

Finding your own issues and solving them is a good sign for developers, you should always be ready to debug , distinguish the logical errors and syntactical errors.

 

Enjoy Coding! What about the task?

--

innocentumesh

unread,
Feb 3, 2013, 6:03:33 AM2/3/13
to phpgroup2...@googlegroups.com, innocentumesh
I am doing my task sir.
I am enjoying playing with PHP CODES ...................
Anyway I will discuss this matter  with you in class. At present I have solved my problem.

To unsubscribe from this group and stop receiving emails from it, send an email to phpgroup24broadway+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages