Jump to content

call to undefined function


Lassie

Recommended Posts

I have a function that gives a call to undefined function error.
This is the code
[code]
$dir=fulfilment($email);
function fulfilment($email)
{
$email= $email;
  $salt=rand(10000,99999);
  $hash=md5($email.$salt);
 
  include("misc.inc");
    $connection = mysql_connect($host,$user,$password)   
      or die ("$connection:".mysql_error($connection));
  $db = mysql_select_db($database,$connection)         
      or die ("$db:".mysql_error($connection));
     
$query = "UPDATE Customer SET hash='$hash' WHERE email='$email';
  $result = mysql_query($query);
  if (!$result)
  {
  return false;
  }
  //create temp folder with hash info
  define('DOWNLOAD_DIR', 'C:/pick_up/');
 
  //check if folder already exits
 
  if(file_exists($hash))
  {
    echo 'Dir exist';

}else{
  mkdir(DOWNLOAD_DIR.$hash);
  $dir=(DOWNLOAD_DIR.$hash);
  return $dir;
}
}
?>

[/code]
I have checkd that the $email variable is available before calling the function and I can't see why it is undefined.
Any help appreciated.
Link to comment
https://forums.phpfreaks.com/topic/33830-call-to-undefined-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.