// inst_list  - list institutions

#cgivar ord
#setifnotgiven ord = "name"

#set TITLE = "Institutions"
#include top

<center>

// form for ordering options...
<form action="?" method=GET>
#formtarget inst_list
Order by: 
<select name=ord size=1>
#optionlist selected=@ord options=name,city,country
</select>
&nbsp;
<input type=submit value=Go>
</form>
<br>
 

// issue SQL retrieval
#sql 
  select * from examp_institutes 
  order by @ord
#endsql

// start the table..
<table cellpadding=2>
<tr align=center bgcolor=FFFFEC><td>Name</td>
  <td>City</td><td>Country</td></tr>

// display the rows..
#while $sqlrow() = 0
  <tr bgcolor=FFFFFF>
  <td><a href="?rtn=inst_details&id=@id">@name</a></td>
  <td>@city</td>
  <td>@country</td>
  </tr>
#endloop
</table>
