Lassie Posted January 11, 2007 Share Posted January 11, 2007 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 More sharing options...
trq Posted January 11, 2007 Share Posted January 11, 2007 Can we see the entire error? Link to comment https://forums.phpfreaks.com/topic/33830-call-to-undefined-function/#findComment-158723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.