Hello all.
I have a function in which I change a variable but I can not ssem to use it later on 😮
Here is the little function and the script:
[code=php]function doIt($img)
{
if !($hh1 = (@file_get_contents($img))) {
$message2 = “This image is not good”;
return;
} // end if
} // end of function
$message1 = “none”;
$message2 = “none”;
doIt($image);
if($message2 != “none”){
$message1 = “The Picture file did not upload” ;
require_once (“disPicts.php”);
exit();
} // endif
The disPicts.php contains this:
[code=php]
if($message1 != “none”){
echo “<span style=’color:blue; font-weight:bold;’>$message1<br>$message2</span> “;
} // end if
So should I be able to see this message:
[QUOTE]
The Picture file did not upload
This image is not good”;
or do I need to “pass” the variable $message2 out of the function ?
For some reason I am only getting:
[QUOTE]
The Picture file did not upload
Thanks for your help ?