Jump to content
php.lv forumi

Cannot redeclare quote_smart()


xmas12

Recommended Posts

Sveiki. Es izmantoju Ownmen reģistrācijas script un ielogošanās un es to script pieliku klāt savam dizianma. agraak viss gaaja bet tagad ejot reģistrācijas lapā tad mna uzmetas šāds..

 

Fatal error: Cannot redeclare quote_smart() (previously declared in C:\Xamp\htdocs\nav2\include\functions.php:12) in C:\Xamp\htdocs\nav2\include\functions.php on line 25

 

Un šeit ir function fails:

 

<?php

// Izlogoties
if(isset($_GET['darbiiba']) and $_GET['darbiiba'] == "logout")
{
mysql_query("UPDATE lietotaaji SET online='N' WHERE id={$_SESSION['id']}");
unset($_SESSION['id']);
session_destroy();
}

//quote_smart funkcija
function quote_smart($value)
{
// Stripslashes
if (get_magic_quotes_gpc())
{
	$value = stripslashes($value);
}
// Quote if not a number or a numeric string
if (!is_numeric($value))
{
	$value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;
}

?>

 

mby kaads var paliidzeet!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...