Erweiterte Suche

schnippii

Grünschnabel
Hallo, ich folgendes html Formular. Wie kann ich das ganze mit einer Tabelle vergleichen und zu den passenden Ergebnissen die links zu den Wohnungen ausgeben?

HTML:
<form action="suchen.php" method="post"><label for="Zimmerauswahl">Zimmerauswahl:</label><br /><input id="z1" style="width: 21px;" type="text" name="z1" /><label for="bis">bis</label><input id="z2" style="width: 21px;" type="text" name="z2" /><label for="Wohnflaeche">Wohnfläche:</label><br /><input id="w1" style="width: 21px;" type="text" name="w1" /><label for="bis">bis</label><input id="w2" style="width: 21px;" type="text" name="w2" /><label for="Mietpreis">Mietpreis:</label><br /><input id="m1" style="width: 21px;" type="text" name="m1" /><label for="bis">bis</label><input id="m2" style="width: 21px;" type="text" name="m2" /><select id="Ausstattung" class="af-select af-formvalue " name="Ausstattung"><option selected="selected" value="Comfort">Comfort</option><option value="Highline">Highline</option><option value="Wohnen 50+">Wohnen 50+</option></select><label id="label-element-7" class="label" style="color: #97bf0d; font-family: Trebuchet MS; font-size: 1.2em; font-weight: normal;">&nbsp; <span class="labelelementvalue">&nbsp;</span></label><br />
<div>
<div class="option-container"><input id="element-7-1" class="af-formvalue" type="checkbox" name="element-7" value="Balkon" /><label id="label-7-1" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-1">Balkon</label>
</div>
<div class="option-container"><input id="element-7-2" class="af-formvalue" type="checkbox" name="element-7" value="Garten" /><label id="label-7-2" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-2">Garten</label>
</div>
<div class="option-container"><input id="element-7-3" class="af-formvalue" type="checkbox" name="element-7" value="Lift" /><label id="label-7-3" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-3">Lift</label>
</div>
<div class="option-container">&nbsp;</div>
</div>
<div class="element">
<div class="option-container"><input id="element-5" class="submit " style="color: #555555; font-family: Arial; font-size: 1.3em; font-weight: bold; background-color: #f1f1f1; border: 1px solid #cccccc; width: 140px;" type="submit" name="element-5" value="suchen" />
</div>
</div>
<div id="validation">&nbsp;</div><label id="Ausstattung" class="label"><!--contactform-content--> </label>
</form>
 
Wir formatieren das erstmal und dann können wir weiter schauen:
HTML:
<form action="suchen.php" method="post">
  <label for="Zimmerauswahl">Zimmerauswahl:</label>
  <br />
  <input id="z1" style="width: 21px;" type="text" name="z1" />
  <label for="bis">bis</label>
  <input id="z2" style="width: 21px;" type="text" name="z2" />
  <label for="Wohnflaeche">Wohnfläche:</label>
  <br />
  <input id="w1" style="width: 21px;" type="text" name="w1" />
  <label for="bis">bis</label>
  <input id="w2" style="width: 21px;" type="text" name="w2" />
  <label for="Mietpreis">Mietpreis:</label>
  <br />
  <input id="m1" style="width: 21px;" type="text" name="m1" />
  <label for="bis">bis</label>
  <input id="m2" style="width: 21px;" type="text" name="m2" />
  <select id="Ausstattung" class="af-select af-formvalue " name="Ausstattung">
    <option selected="selected" value="Comfort">Comfort</option>
    <option value="Highline">Highline</option>
    <option value="Wohnen 50+">Wohnen 50+</option>
  </select>
  <label id="label-element-7" class="label" style="color: #97bf0d; font-family: Trebuchet MS; font-size: 1.2em; font-weight: normal;">&nbsp; <span class="labelelementvalue">&nbsp;</span></label>
  <br />
  <div>
    <div class="option-container">
      <input id="element-7-1" class="af-formvalue" type="checkbox" name="element-7" value="Balkon" />
      <label id="label-7-1" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-1">Balkon</label>
    </div>
    <div class="option-container">
      <input id="element-7-2" class="af-formvalue" type="checkbox" name="element-7" value="Garten" />
      <label id="label-7-2" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-2">Garten</label>
    </div>
    <div class="option-container">
      <input id="element-7-3" class="af-formvalue" type="checkbox" name="element-7" value="Lift" />
      <label id="label-7-3" style="display: inline; color: #000000; font-family: Verdana; font-size: 0.8em; font-weight: normal;" for="element-7-3">Lift</label>
    </div>
    <div class="option-container">&nbsp;</div>
  </div>
  <div class="element">
    <div class="option-container">
      <input id="element-5" class="submit " style="color: #555555; font-family: Arial; font-size: 1.3em; font-weight: bold; background-color: #f1f1f1; border: 1px solid #cccccc; width: 140px;" type="submit" name="element-5" value="suchen" />
    </div>
  </div>
  <div id="validation">&nbsp;</div>
  <label id="Ausstattung" class="label"><!--contactform-content--> </label>
</form>
 
Ok, noch mal ordentlich formatiert:

HTML:
  <form action="suchen.php" method="post">
  <label for="Zimmerauswahl">Zimmerauswahl:</label><br />
  <input id="z1" style="width: 21px;" type="text" name="z1" />
  
  <label for="bis">bis</label>
  <input id="z2" style="width: 21px;" type="text" name="z2" />
  
  <label for="Wohnflaeche">Wohnfläche:</label><br />
  <input id="w1" style="width: 21px;" type="text" name="w1" />
  
  <label for="bis">bis</label>
  <input id="w2" style="width: 21px;" type="text" name="w2" />

  <label for="Mietpreis">Mietpreis:</label>
  <br />
  <input id="m1" style="width: 21px;" type="text" name="m1" />
  <label for="bis">bis</label>
  <input id="m2" style="width: 21px;" type="text" name="m2" />

    Ausstattung
   <select id="Ausstattung" class="af-select af-formvalue " name="Ausstattung">
   <option selected="selected" value="Comfort">Comfort</option>
   <option value="Highline">Highline</option>
   <option value="Wohnen 50+">Wohnen 50+</option></select>

    <input type="checkbox" name="zusatz" value="Balkon"> Balkon<br>
    <input type="checkbox" name="zusatz" value="Garten"> Garten<br>
    <input type="checkbox" name="zusatz" value="Lift"> Lift
</form>
 
Zuletzt bearbeitet:
Zurück