Web Design Forum: Inserting Appatcion Errors To table in database - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Inserting Appatcion Errors To table in database Rate Topic: -----

#1 User is offline   lee sands 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 134
  • Joined: 14-August 10
  • Reputation: 0
  • Gender:Male
  • Location:Gosport, Hampshire, UK
  • Experience:Beginner
  • Area of Expertise:Coder

Posted 02 January 2012 - 01:31 PM

Hi all is there a way to record a incrocet login to a database table like a fuction maybe any ideas would help thanks
0

#2 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

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
1

#3 User is offline   lee sands 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 134
  • Joined: 14-August 10
  • Reputation: 0
  • Gender:Male
  • Location:Gosport, Hampshire, UK
  • Experience:Beginner
  • Area of Expertise:Coder

Posted 02 January 2012 - 01:37 PM

Hey thanks for the reply i have some code here that may help you

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
0

#4 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

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
0

#5 User is offline   lee sands 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 134
  • Joined: 14-August 10
  • Reputation: 0
  • Gender:Male
  • Location:Gosport, Hampshire, UK
  • Experience:Beginner
  • Area of Expertise:Coder

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
0

#6 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 02 January 2012 - 02:07 PM

Ah OK, no problem
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users