From 0834fbe777fdb2d94c3f087dea098972a96b872e Mon Sep 17 00:00:00 2001 From: Dave Page Date: Tue, 26 Aug 2008 22:44:11 +0100 Subject: [PATCH] Clear the session arrays before populating them. --- results.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.39.5