below is my script to call up info, it displays all info when i call
http://localhost/card.php.
but when its include into a file there is nothing only the html
stuff from function cards. any ideas
<?php require "include.lib.php";
function cards($userslist){
global $userslist;
return <<<EOF
<table style='border:1px dotted blue;width:30%;font-family:Verdana;font-size:10px'>
<tr>
<td width="10%" style='border:1px dotted blue;'><img src="$userslist[name].jpg">
</td>
<td width="90%" align="left" valign="top">
<br>
<strong>Card:</strong>$userslist[name]
<br>
<strong>Type:</strong>$userslist[type]
<br>
<strong>Inscription:</strong>$userslist[inscription]
<br>
<strong>Attribute:</strong>$userslist[atributes]
</td>
</tr>
</table>
<br>
EOF;
}
//$typeselect = weapon;
$sql = "SELECT * FROM ro_cards"; //WHERE type='$typeselect'";
$results = mysql_query($sql,$db);
while($userslist = mysql_fetch_array($results))
{
echo cards($userslist);
}
mysql_close($db);
?>