php - Results Fetched from Mysql DB Stay on Page -
i m fetching table mysql using php result displayed array on html page result stays on page if refresh page or if fetch new record adds end of previous result
please guide me result removed on page refresh or if new row ordered must replace previous 1 here's code
<div id="output"> <form id="suserb" name="output" action="" method="post"> <input type="submit" value="select" name="suser"></form> <div id="suser"> <?php if (isset($_post['suser'])) { $omysql = new mysql('library', 'root', '', 'localhost'); $where = array('bid' => '0'); echo "<pre>"; $result = $omysql->select('user', $where); print_r($result); echo "</pre>"; foreach ($result $key => $val) { foreach ($val $label => $item) { echo $label . "====" . $item . "<br >"; } } } ?> </div>
regards
isn't obvious result stays on page? every time refresh page, query gets executed , spits out content of table on page.
Comments
Post a Comment