Hi all is there a way to record a incrocet login to a database table like a fuction maybe any ideas would help thanks
Page 1 of 1
Inserting Appatcion Errors To table in database
#2
Posted 02 January 2012 - 01:34 PM
Is it possible to record...Yes
Is there a function...Not really. You need to insert a database record like you would any other record when your user gives incorrect details
Is there a function...Not really. You need to insert a database record like you would any other record when your user gives incorrect details
#3
Posted 02 January 2012 - 01:37 PM
Hey thanks for the reply i have some code here that may help you
its the log_access() that i am intrsted in i hope you can help
function check_sess_key() {
// Validates session key
isset($_SESSION['uid']) ? $c_uid = cleansql($_SESSION['uid']) : $c_uid =0;
if(!isset($_SESSION['skey'])) {
log_access($c_uid, "Sec No Key");
return false;
}
if(strcmp($_SESSION['skey'], md5enc(date("ly").$_SERVER['REMOTE_ADDR'].date("md")) ==0)) {
return true;
} else {
if(strcmp($_SESSION['skey'], d5enc(date("ly",strtotime("-1 day")).$_SERVER['REMOTE_ADDR'].date("md",strtotime("-1 day")))) == 0 && intval(date("h")) == 0 && intval(date("i")) < 15){
set_sess_key();
return true;
} else {
log_access($c_uid,"Sec Wrong Key");
return false;
}
}
}its the log_access() that i am intrsted in i hope you can help
#4
Posted 02 January 2012 - 01:39 PM
That will be defined somewhere if you're using an application. You didn't give any indication that you were using a pre-built app or that the function already existed at all. Can you please explain with a bit more detail exactly what you want and what you are using etc etc
#5
Posted 02 January 2012 - 01:58 PM
dont worry i have worked it out its a basic insert via fuction to a table i did just not know where to start thanks foryou help +1
- ← Complete nightmare contact form!
- Server Side (PHP, Databases, ASP.NET, etc)
- File Managers Codeing? →
Share this topic:
Page 1 of 1
Help
















