From: Dave Page Date: Tue, 26 Aug 2008 21:44:11 +0000 (+0100) Subject: Clear the session arrays before populating them. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0834fbe777fdb2d94c3f087dea098972a96b872e;p=pgphonehome.git Clear the session arrays before populating them. --- diff --git a/results.php b/results.php index 4815a0b..fed60b2 100644 --- a/results.php +++ b/results.php @@ -45,12 +45,14 @@ if ($res === false) // Start a session to store the results in session_start(); -$message = "Rows: " . pg_affected_rows($res); - $list = ""; $divs = ""; $rownum = 0; +// Initialise the arrays to clear any old data +$_SESSION['columns'] = array(); +$_SESSION['rows'] = array(); + // Store metadata for future use $_SESSION['column_count'] = pg_num_fields($res); $_SESSION['actual_rows'] = pg_num_rows($res);