ok so heres my function without globals and such
function userinfo($tot){
require 'database connection';
$query = "SELECT * FROM database name WHERE id = '$tot'";
$result = mysql_query($query) or die("Invalid query:" .mysql_error() );
$i = 0;
$name =mysql_result($result,$i,"name");
$id =mysql_result($result,$i,"id");
;}
and i want to call it like so
userinfo($captid);
echo"$name<br>";
unset($name);
userinfo($ply2id);
echo"$name<br>";
nows where the fun part comes
ive tried setting the $name and $id to globals and inside the global array
the problem allways arises when i try to unset it and then call the function the 2nd time
any ideas?
when u answer please bare in mind that the function wil be used 10 times or more thanks in avance
/edit i also dont want to do it all in one function as i have meny more things to do with the function and global and i would like to know how to use it correctly
--NoRp