Hello everybody, first of all sorry for my bad english
So, i have a script page admin.php which includes functions.php
When i try to recall the value of a variable from functions.php it will not work.
[php]echo "
This will call the function wich i have in functions.php
[php]
function adauga_categorie($nume_categorie){
if(empty($nume_categorie)){
echo āIntrodu numele categoriei pe care vrei sa o adaugiā;
}else{
$introdu = mysql_query(āINSERT INTO categorie
VALUES(āā,ā$nume_categorieā)ā);
if(@$introdu){
$mesaj = āCategoria $nume_categorie a fost adaugata in baza de date.ā;
return $mesaj;
}
}
}[/php]
This should return the variable $mesaj.
But when i try to get the variable $mesaj in admin.php it will not work, i get $mesaj empty after declaring it global.
[php]global $mesaj;
if(isset($mesaj)){
echo "
$mesaj
}[/php]
Simplified i need to pop out a message after the function was done in a message box.
This script will be used just by me, this is why I havent securised him yet.
Thanx