Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter michelemaro

    (@michelemaro)

    maybe next or the other week I’ll publish it so you will have your live example. Tomorrow I will check up with firebug.

    Why exactly 2 countries don’t open up?

    This is my questions! ??

    Thread Starter michelemaro

    (@michelemaro)

    <h1>Controlla le destinazioni disponibili:</h1>
    <?php
    
    echo "<h2>Di seguito le schede riassuntive delle destinazioni erasmus disponibili:</h2>";
    
    $db_host = "localhost";
    $db_user = "***";
    $db_password = "***";
    $db_database = "***";
    
    //connessione al db
    $link = mysql_connect($db_host , $db_user, $db_password) or die("Could not connect : " . mysql_error());
    mysql_select_db($db_database) or die ("Database $db_database not select.." . mysql_error());
    
    //esecuzione query per ottenere i campi dei Paesi
    $result = mysql_query("SELECT DISTINCT paese FROM universita ORDER BY paese ASC");
    if (!$result) {
         die('Invalid query: ' . mysql_error());
    }
    
    $pageURL = "https://localhost/erasmusPSY/wordpress/?page_id=62";
    
    //echo dei paesi,  colonna 1 elenco paesi, colonna 2 elenco università, colonna 3 scheda
    echo "<table border=1><tr><td>";
    
    while ($row = mysql_fetch_assoc($result)) {
          echo "<a href='" . $pageURL . "&paese=" . $row['paese'] . "'>" . $row['paese'] . "</a><br>";
    }
    
    echo "</td><td>";
    
    //ora faccio l'echo della colonna con i nomi delle università del paese selezionato
    if (!isset($_GET['paese']))
    echo "Seleziona una destinazione a sinistra!";
    else {
           //esecuzione query per ottenere i campi delle destinazioni
           $result = mysql_query("SELECT * FROM universita WHERE paese='" . $_GET['paese'] . "'");
           if (!$result) {
                 die('Invalid query: ' . mysql_error());
           }
    	   $i = 0;
           while ($row = mysql_fetch_assoc($result)) {
               echo "[thkBC height='600' width='600' anchortext='".$row['Nome']."' title='".$row['Nome']."' type='inline' html_wrap='p' inline_id='inlinecontent".$i."']";
    		   echo	"<div id='inlinecontent".$i."'>";
    		   echo "<div><table border='1' width='100%'>";
               echo "<tr><td>Codice Università: </td><td>" . $row['Codice'] . "</td></tr>";
               echo "<tr><td>Sede:</td><td>" . $row['Sede'] . "</td></tr>";
               echo "<tr><td>Indirizzo sede:</td><td>" . $row['IndirizzoSede'] . "</td></tr>";
              echo "<tr><td>Pagina WEB:</td><td> <a target=.blank href='" . $row['URL'] . "'>" . $row['URL'] . "</a></td></tr>";
               echo "<tr><td>Telefono relazioni internazionali:</td><td>" . $row['RecapitoRelazioniInternazionali'] . "</td></tr>";
               //echo "<tr><td>Fax relazioni internazionali:</td><td>" . $row['FaxRelInt'] . "</td></tr>";
               echo "<tr><td>Email relazioni internazionali:</td><td>" . $row['EmailRelazioniInternazionali'] . "</td></tr>";
               echo "<tr><td>Responsabile relazioni internazionali:</td><td>" . $row['ResponsabileRelazioniInternazionali'] . "</td></tr>";
    echo "<tr><td>Indirizzo relazioni internazionali:</td><td>" . $row['IndirizzoRelazioniInternazionali'] . "</td></tr>";
              echo "<tr><td>Info varie:</td><td>" . $row['Info'];
                 echo  "</td></tr></table>";
    		   echo "</div></div>";
    		   $i++;
           }
    }
    //chiudo la tabella
    echo "</td></tr></table>";
    
    ?>

    This is the whole page!

    Thread Starter michelemaro

    (@michelemaro)

    maybe I did not explain me well ??
    I’ve already tryed with static data and it works.
    In the code that I post there is only the closing tag of table and tr and td becouse I posted only a part of the page. If you want I can post the other part! (but is only the connection to the db and the opening table tag ?? ).
    My problem is: I’m working at Padua University (Italy) for the erasmus office. I have a table in the DB that contains all the information about foreing universities that exchange students with us.
    In this page I want to give to paduan students the possibility to look at the destinations avaiable in each countries.
    The table that I create to do this has a first column with all the countries. The country name is a link (<a>Country_Name</a>) that show a second column that shows all the universities avaiable in that country.
    Finally ?? each university name shows up a ThickBox with the useful informations about that university.

    Is it clear now? ??

    Everything is working with all countries except for Germany and Spain. The courious fact that make me ask “TOO BIG??” is that these country have much more universities than the others. And if I try to remove one random table row Germany start to work, Spain need two random rows removal.

    So can anyone help me? ??

    Thanks also for reading!

    Thread Starter michelemaro

    (@michelemaro)

    Hope to be clear ??

Viewing 4 replies - 1 through 4 (of 4 total)