Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. mirko.como
    3. Post
    M

    mirko.como

    @mirko.como

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 1
    • Post 5
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    Età 17
    0
    Reputazione
    5
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User Newbie

    Post creati da mirko.como

    • RE: Campo ricerca non funzionante !!!

      Intendevo fermare "l'intestazione" delle colonne, il titolo della colonna, la prima riga! In modo che quando scorrono le righe di dati la prima riga sia fissa e si possa sempre sapere che dato si sta leggendo !
      Grazie

      postato in Coding
      M
      mirko.como
    • RE: Campo ricerca non funzionante !!!

      Grazie Luca, ho fatto così:
      [php]?>
      <form method="POST">
      Provincia : <input type="text" name="term" id="term" /><br/>
      Comune : <input type="text" name="term2" id="term2" /><br/>
      Zona : <input type="text" name="term3" id="term3" /><br/>
      Tipologia : <input type="text" name="term4" id="term4" /><br/>
      <input type="submit" name="search" id="search" value="Search" />
      </form>
      <?
      }elseif(isset($_POST['search'])){
      $term = addslashes($_POST['term']);
      $term2 = addslashes($_POST['term2']);
      $term3 = addslashes($_POST['term3']);
      $term4 = addslashes($_POST['term4']);
      $search = mysql_query("SELECT * FROM immobili WHERE Provincia LIKE '%$term%' AND Comune LIKE '%$term2%' AND Zona LIKE '%$term3%' AND Tipologia LIKE '%$term4%'" );
      $total = mysql_num_rows($search);
      if($total == 0){
      echo 'Nessun risultato ';
      }else{
      ?>
      <caption>
      <strong>Risultati ricerca</strong>
      </caption>
      <p> </p>
      <tr>
      <table width="100%" border="1">
      <th scope="col">Provincia</th>
      <th scope="col">Comune</th>
      <th scope="col">Zona</th>
      <th scope="col">Tipologia</th>
      <th scope="col">Mq</th>
      <th scope="col">Locali</th>
      <th scope="col">Prezzo</th>
      <th scope="col">Vendita</th>
      <th scope="col">Affitto</th>
      <th scope="col">Descrizione</th>
      <th scope="col">Foto</th>
      </tr>
      <?php
      while($r = mysql_fetch_array($search)){
      ?>
      <tr>
      <td><?php echo $r['Provincia']; ?></td>
      <td><?php echo $r['Comune']; ?> </td>
      <td><?php echo $r['Zona']; ?> </td>
      <td><?php echo $r['Tipologia']; ?> </td>
      <td><?php echo $r['Mq']; ?> </td>
      <td><?php echo $r['Locali']; ?> </td>
      <td><?php echo $r['Prezzo']; ?> </td>
      <td><?php echo $r['Vendita']; ?> </td>
      <td><?php echo $r['Affitto']; ?> </td>
      <td><?php echo $r['Descrizione']; ?> </td>
      <td><a href="#" onClick="javascript:window.open('virtual_img/virtual_tour_demo.html','_blank','status=yes,top=0,left=0,width=811,height=561');"><img src="<?php echo $r['Foto']; ?>" /></a></td>
      <tr>
      <?php
      } // End While.
      ?>
      </table>
      <?php
      } // End Else.
      } // End ElseIf.
      ?>
      </body>
      </html>
      [/php]

      Si possono fermare le intestazioni delle colonne ? Così da sapere sempre quali campi sto leggendo !
      Queste:
      <th scope="col">Provincia</th>
      <th scope="col">Comune</th>
      <th scope="col">Zona</th>
      <th scope="col">Tipologia</th>
      <th scope="col">Mq</th>
      <th scope="col">Locali</th>
      <th scope="col">Prezzo</th>
      <th scope="col">Vendita</th>
      <th scope="col">Affitto</th>
      <th scope="col">Descrizione</th>
      <th scope="col">Foto</th>

      Grazie, ciao!

      postato in Coding
      M
      mirko.como
    • RE: Campo ricerca non funzionante !!!

      Grazie, ma non sono in grado di gestire tabelle in PHP!!!! :arrabbiato:

      postato in Coding
      M
      mirko.como
    • RE: Campo ricerca non funzionante !!!

      Mancava questo:
      $term2 = addslashes($_POST['term2']);
      .....però rimane il problema del layout dei dati!!!!
      Come faccio?

      postato in Coding
      M
      mirko.como
    • Campo ricerca non funzionante !!!

      Ciao, scusate ragazzi ma di php ne capisco poco niente e non riesco a far lavorare il secondo campo della ricerca:
      [php]?>
      <form method="POST">
      Ricerca : <input type="text" name="term" id="term" /><br/>
      Ricerca2: <input type="text" name="term2" id="term2" /><br/>
      <input type="submit" name="search" id="search" value="Search" />
      </form>
      <?
      }elseif(isset($_POST['search'])){
      $term = addslashes($_POST['term']);
      $search = mysql_query("SELECT * FROM immobili WHERE Provincia LIKE '%$term%' AND Citta LIKE '%$term2%'" );
      $total = mysql_num_rows($search);
      if($total == 0){
      echo 'Nessun risultato ';
      }else{
      while($r = mysql_fetch_array($search)){ echo $r['Provincia'] ; echo $r['Citta'] ; echo $r['Zona'] ; echo $r['Tipologia'] ; echo $r['Mq'] ; echo $r['N° locali'] ; echo $r['Prezzo'] ; echo $r['Vendita'] ; echo $r['Affitto'] ; echo $r['Descrizione'] . '<br />';
      } // End While.
      } // End Else.
      } // End ElseIf.
      ?>[/php]

      Poi vorrei incolonnare decentemente i dati che estrae la query, potete farmi un esempio o dirmi su che istruzioni devo lavorare?
      Grazie.

      postato in Coding
      M
      mirko.como