Function fails on second consecutive call

From: Date: Mon, 05 Jun 2000 20:59:38 +0000
Subject: Function fails on second consecutive call
Groups: php.general 
Request: Send a blank email to php-general+get-1090@lists.php.net to get a copy of this message
I have a function that pulls data from the database and then displays it on the screen (see below for code). If I call this function once, everything works fine. However, if I try to call it twice, the first series of data shows up but the second does not. Any ideas would be greatly appreciated. --- <snip> ------ function showinfo($userid) { // Global Variables global $tables; $linkid = connection(); echo ("User id = ". $userid); echo ("<table border ='0'>"); echo ("<tr>"); while (list($key, $val) = each ($tables["user"])) { if ($key == 3) { echo("</tr><tr>"); } $result = my_query("select * from $val where userid='$userid'", $linkid); ftable($val, $result); } echo ("</tr>"); echo ("</table>"); } --- <snip> ------ Paul Strange

« previous php.general (#1090) next »