2 Replies - 211 Views - Last Post: 09 March 2014 - 05:06 PM Rate Topic: -----

#1 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 133
  • Joined: 08-May 13

Re-Declaration error but no re-declaration?

Posted 09 March 2014 - 04:44 PM

For some reason I keep getting this error when I run my script
Fatal error: Cannot redeclare logact() (previously declared in /home3/amby/public_html/***/func/usermanage.php:5) in /home3/amby/public_html/***/func/usermanage.php on line 9


Here my code:

function LogAct($action)
{
$input=array("Action"=>$action,"User"=>$_SESSION['user'],"IP"=>$_SERVER['REMOTE_ADDR'],"Time"=>Date('d-m-Y:h-i-s'));
mysqli_query($GLOBALS['con'],"INSERT INTO sv_log(NULL,'".$input['Action']."','".$input['IP']."','".$input['User']."','".$input['Time']."')");
}


Can you guys help me figure this out?

This post has been edited by ArtificialSoldier: 11 March 2014 - 09:36 AM
Reason for edit:: Removed explicit site name


Is This A Good Question/Topic? 0
  • +

Replies To: Re-Declaration error but no re-declaration?

#2 mr.gr33n  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 07-January 14

Re: Re-Declaration error but no re-declaration?

Posted 09 March 2014 - 04:52 PM

Can you please provide us with all of the code in that file.
Its a little hard to help if not all or most of the code is present.
Was This Post Helpful? 0
  • +
  • -

#3 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 133
  • Joined: 08-May 13

Re: Re-Declaration error but no re-declaration?

Posted 09 March 2014 - 05:06 PM

I fixed it. I included the file twice. (In the header, and again in the normal code)

This post has been edited by Ambitious: 09 March 2014 - 05:43 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1