I have a portal which I´m trying to display some fields from a database. The point is that the user could select county and then all companies that deliver in that county will show.

I´m pretty new to this so I have no idea if i´m even on the right track.

If somebody have done this before or know of a tutorial that would help a lot. Thanks!

PHP Code:
include (
$connect mysql_connect($host,$username,$password) or die('<p class="error">Unable to connect to the database server at this time.</p>');  
mysql_select_db($database,$connect) or die('<p class="error">Unable to connect to the database at this time.</p>');
$_POST['send'])) {  
$_POST['fylke']) || empty($_POST['merke']) || empty($_POST['type'])) {  
'<p class="error">You did not fill in a required field.</p>');  
    } else {  
$query "SELECT FROM forhandlere WHERE id, navn, fylke='$_POST[fylke]', logo, merke='$_POST[merke]', funksjon='$_POST[funksjon]', text, web;";  

$result = @mysql_query("$query") or die('<p class="error">There was an unexpected error grabbing from the database.</p>'); 

while (
$row mysql_fetch_array($result)) {  

$logo = ($row['logo']);
$ename = ($row['navn']);
$fylke = ($row['fylke']);
$eemail = ($row['merke']);
$efunksjon = ($row['funksjon']);
$eepost = ($row['text']);
$eweb = ($row['web']);   
'<div style="background-color:#E00; height:auto; width:200px; border:1px solid #0F0;>
         <img src="'
.$logo.'" alt="'.$ename.'"> 
    <p><a href="http://'
.$eweb.'" rel="nofollow" target="_blank">'.$eweb.'</a></p>


The Form:

HTML Code:
 <form action="<?PHP $self ?>" method="post">
<table border="0">
                <td colspan="2" align="left" valign="top"><p>Finn din lokale forhandler.</p></td>
                <td align="left"><p>Fylke: </p></td>
                <td width="150"><select name="fylke" size="1" id="fylke" style="width:150px">
                    <option value="akershus">Akershus</option>
                    <option value="austagder">Aust-Agder</option>
                    <option value="buskerud">Buskerud</option>
                    <option value="finnmark">Finnmark</option>
                    <option value="hedmark">Hedmark</option>
                    <option value="hordaland">Hordaland</option>
                    <option value="moreogromsdal">Møre og Romsdal</option>
                    <option value="nordland">Nordland</option>
                    <option value="nordtrondelag">Nord-Trøndelag</option>
                    <option value="oppland">Oppland</option>
                    <option value="oslo">Oslo</option>
                    <option value="rogaland">Rogaland</option>
                    <option value="sognogfjordane">Sogn og Fjordane</option>
                    <option value="sortrondelag">Sør-Trøndelag</option>
                    <option value="telemark">Telemark</option>
                    <option value="vestfold">Vestfold</option>
                    <option value="vestagder">Vest-Agder</option>
                    <option value="ostfold">Østfold</option>
                <td align="left"><p>Merke: </p></td>
                    <select name="merke" size="1" id="merke" style="width:150px">
                      <option value="foma">Foma</option>
                      <option value="panasonic">Panasonic</option>
                      <option value="toshiba">Thosiba</option>
                <td><p>Type: </p></td>
                    <select name="type" size="1" id="type" style="width:150px">
                      <option value="vann/vann" selected="selected">Vann --&gt; Vann</option>
                      <option value="luft/luft">Luft --&gt; Luft</option>
                      <option value="luft/vann">Luft --&gt; Vann</option>
                <td align="left">&nbsp;</td>
                <td align="right"><label>
                    <input type="submit" name="send" id="send" value="Søk" />