Hi guys,
I have a page that echos fields from a database based on various text and combo box selections. I am trying to get it so that when the page is refreshed, the echoed vales are still displayed, even if the form fields are reset.
Im under the impression that i need to use cookies to acheive this however all the code I find via google only lets me display cookie values.
The code i use to display the database values is as follows:
<?php
mysql_connect ("localhost", "pegasus","123456") or die (mysql_error());
mysql_select_db ("partslist");
if ($term == "") {
echo "";
}
else {
$sql = mysql_query("select * from $table where part like '$term'");
while ($row = mysql_fetch_array($sql)){
?>
<div id="display-part"><?php echo $row['part'] .' '.$table; ?></div>
<div id="display-partno"><?php echo $row['partno']; ?></div>
<div id="display-alternative"><?php echo $row['alternative']; ?></div>
<?php
}
}
?>
All help is greatly appreciated.