Fill field who depend on stored IP |
7/23/2012 12:21:27 PM |
PHPRunner General questions | |
W
wundebar author
Hi at all! |
|
![]() |
Sergey Kornilov admin 7/24/2012 |
Not sure if I understood this question right but $_SESSION variables will work even if you don't have a login page. |
W
|
wundebar author 7/25/2012 |
Hi admin, i'm a newbie and i was sure it was not possible. |
W
|
wundebar author 7/27/2012 |
Hi admin, i'm a newbie and i was sure it was not possible. So can someone explain it to me with some example? I wrote $_SESSION["UserID"] into the field "edit as" like a default value, but nothing happen. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=67175&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' /> Thanks
|
W
|
wundebar author 7/31/2012 |
Hi to everybody. Some solution? With $_SESSION["UserID"] as default value, it returns to me something like: "t32thkm39ut7pk9k1fm19m1mo2" how can i change this with a name? I also noticed that every time that i close firefox and then i open it again, the string changes again. So my question is: how can i change that result into a name and get always the same name even if i close the web browser and then re-open it? Thanks in advance.
|
![]() |
Sergey Kornilov admin 8/1/2012 |
I guess you need to provide more info on this. |
W
|
wundebar author 8/22/2012 |
I guess you need to provide more info on this. If you don't have a login page - how wold you know the name of the current user?
|
C
|
copper21 8/22/2012 |
I think I understand your question. You have a table containing 2 fields; one that has ip addresses and one that has names. Each ip address has a corresponding name. If you are getting a valid ip address using $_SERVER['REMOTE_ADDR'], and from that you would like to lookup on your table the name associated with that IP address. If $_SERVER['REMOTE_ADDR'] works like a session variable, not sure if it does, then you can get this a couple of ways. If you are on the add or edit page, you can use the events to do this. GO to add/edit event, "Process record values" and use this query: |