inqztve
-
Posts
14 -
Joined
-
Last visited
Never
Posts posted by inqztve
-
-
$result = mysql_query("SELECT * FROM pilot ORDER BY pilotid ASC")
$rows = mysql_numrows($result);
$choice = "";
$count = 0;
while($count < $rows)
{
$choice = $choice . "<option value=". mysql_result($result, $count, "your_column"). ">". mysql_result($result, $count, "your_column"). "</option>";
$count++;
}
<select size="1" name="D1"><?echo $choice; ?></select>
>> Please check for typos :). -
Because of the same reason that we were talking before. I want to destroy some other session ---[b]not the current one.[/b] Session destroy can not do that.
-
No, the folder was not created with a script. It's actually the folder that keeps sessions data. I want to remove some of those files later. I think chmod is applicable only for unix/linux not windows.
-
Yes I can go to the folder and delete the file. I checked that.
-
How do I solve this issue? [b][function.unlink]: Permission denied
[/b]
I get this message while using unlink() to delete a file. All permission is enabled for IUSER on the directory I am trying to delete the file from.
Using:
Windows 2003
IIS 6.0
And PHP 5.1.4 (I think). -
Thank you for your help. I can't seem to find any documentation either. All I could find is that it takes an argument. If I could destroy a session by ID, not just the current session.... something like [b]session_destroy(session_id)[/b], it would make my job easier. That is why I was interested at msession_destroy(string arg). I was hoping it would do what I wanted to do.
-
BTW do you know what is msession_destroy()?
-
Yes you got it right! :) Yes, that will work. I need to check kick from the DB before every page to load, can be integrated to login check file. I wos wondering if I can just destroy session associated with the previous login while logging in the next time form a different machine. Apprently can't do that with session_destroy() as I can't call it to destroy different session.
-
Isn't this going to destroy the current session? I want to continue with the current session. I want to destroy session associated with sess_id_in_db in your example. How can I call the session_destroy() from the scopre of the current session (associated with current_sess_d) to destroy another session (sess_id_in_db)?
That is why I wanted to use unlink to delete the session file with sess_id_in_db while log in. -
[u]If not then it must be from an old log in, so destroy that one[/u].
>>>That is what I want to do. I am just looking for a function that will destroy the old one.
I tried wrting my own to actually delte the session file form the dir where is stored.
But it's giving me this error: [b][function.unlink]: Permission denied.[/b]
I am using unlink to delete file.
System summary:
Windows server 2003
IIS 6
PHP 5+ (don't exactly remember)
I have given full permission fo the IUSER for the directory where I store the session file. -
It's good to note HTTP_REFERER is unreliable and should not heavily rely on other than logging user behaviour etc.
-
Hey, thank you for yor reply. I do store the session ID in DB for every session. But, if I use session_destroy() at the beginning of every page when the SESSION IDs don't match then I destroy the current session not the previous session. I want to destroy the previous session if the same user is trying to login again from a different location. It would have been nice if session_destroy() could be called with SESSION ID as agrument. Then I could just call the previous session by that ID and destroy it at during next log in and create a new one. But, unfortunately I can't call session_destroy() by ID.
-
I have login system with PHP and MySQL that uses session variable to keep track. My Issue is:
2) How can I auto logout an user from one location if the same user logs in from a difffernt location? i.e. USER A creates a SESSION with sessionID X(say) from location 1. He/she then forgets to logout or close the browser. And the same USER A tryies to log in from location 2 and creates a session with sessionID Y(say). I want SESSION with ID X be destroyed (so that USER A from location 1 is effectively logged out) before SESSION with ID Y is created. How I destroy a different SESSION? I store the session id in a database table along with associated userID and if the user is logged in or out. So retrieving previous sessionID associated with a user is available during current login (or SESSION).
In other words can I destroy SESSION with sessionID X while I am in SESSION with sessionID Y?
Advanced login issues
in PHP Coding Help
Posted