<?php session_start();
$previous = $_SESSION['previous'];
echo $previous.'<br>';
  
if( !isset($_SESSION['userid']))
{ 
	echo "username is not set <br>";
	session_unset();
}
else
{
	echo "username is set : ".$_SESSION['userid']."<br>";	
	$temp = $_SESSION['userid'];
	session_unset();
	$_SESSION['userid'] = $temp;
}
$_SESSION['previous'] = "search";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search Page</title>

<script type="text/javascript">
function validate(form)
{
form.submit()
}

function re(form1)
{ 
  if(confirm("Do you want to reset the form"))
  {
  }   
}
</script>

</head>
<body>

<form id="form1" name="form1" method="post" action="search_display.php">

	  <table>
		<tr> 
			<td> <label> SEARCH </label><input type="radio" name="RadioGroup1" value="Search" id="RadioGroup1_0"/> </label> </td>
			<td> <label> BUY <input type="radio" name="RadioGroup1" value="Buy" id="RadioGroup1_1" /> </label> </td>
		</tr>
	  </table>

	  <label>isbn
	  <input type="text" name="isbn" id="isbn" />
	  </label>
	  <br>
	  <label> title
	  <input type="text" name="title" id="title" />
	  </label>
	  <br>
	  <label>language
	  <input type="text" name="language" id="language" />
	  </label>
	  <br>
	  <label>publisher
	  <input type="text" name="publisher" id="publisher" />
	  </label>
	  <br>
	  <label>author
	  <input type="text" name="author" id="author"/>
	  </label>
	  <br>
	  <label>library reference number
	  <input type="text" name="libref" id="libref"/>
	  </label>
	  <p>
		<input type="submit" onClick="validate(this.form)" name="button" id="button" value="Submit" />
		<input name="b" type="button" onClick="re(this.form)" id="b" value="Clear" />
	  </p>
	  </form>
	  
</body>
</html>
