Visualizzazione dei risultati da 1 a 5 su 5

Discussione: Inserire html in php

  1. #1
    Utente di HTML.it L'avatar di gaten
    Registrato dal
    Jul 2007
    Messaggi
    1,269

    Inserire html in php

    Salve Ragazzi allora praticcamente devo introdurre HTML in PHP.
    Devo inserire questa tabella :

    <table width="403" border="0">
    <tr>
    <td height="31" colspan="2" background="sfondo_testata_formazione.jpg" style="background-repeat:no-repeat"><table width="397" border="0">
    <tr>
    <td width="184"><div align="left">[img]juve_partita.gif[/img]</div></td>
    <td width="208"><div align="right">[img]roma_partita.gif[/img]</div></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td width="200" class="Stile3"></td>
    <td width="200" class="Stile3"></td>
    </tr>
    </table>";

    Nel Php...Come devo fare?
    Con i sogni possiamo conoscere il futuro...

  2. #2
    Utente di HTML.it L'avatar di alpeweb
    Registrato dal
    Oct 2002
    Messaggi
    1,691
    ?> //qui chiudi il tag php
    <table width="403" border="0">
    <tr>
    <td height="31" colspan="2" background="sfondo_testata_formazione.jpg" style="background-repeat:no-repeat"><table width="397" border="0">
    <tr>
    <td width="184"><div align="left">[img]juve_partita.gif[/img]</div></td>
    <td width="208"><div align="right">[img]roma_partita.gif[/img]</div></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td width="200" class="Stile3"> </td>
    <td width="200" class="Stile3"> </td>
    </tr>
    </table>
    <?php // e qui lo riapri.
    ...altri 5 anni di purga...

  3. #3
    Utente di HTML.it L'avatar di gaten
    Registrato dal
    Jul 2007
    Messaggi
    1,269
    Mi da errore:

    Parse error: syntax error, unexpected '<' in /membri/provasite/partite/lista.php on line 83

    ed è proprio dove inizia la tabella...
    Con i sogni possiamo conoscere il futuro...

  4. #4
    Utente di HTML.it L'avatar di alpeweb
    Registrato dal
    Oct 2002
    Messaggi
    1,691
    Dovresti dire in che punto devi inserire la tabella.
    POsta il codice interessato.
    ...altri 5 anni di purga...

  5. #5
    Utente di HTML.it L'avatar di gaten
    Registrato dal
    Jul 2007
    Messaggi
    1,269
    Ecco il codice ho inserito una frase dove devo inserire la tabella:


    </head>

    <body>
    <span class="Stile11">
    <?php
    //In data devi mettere la data (nel formato americano) e l'ora entro cui l'utente può inserire la sua formazione
    $data_limite = "2007-09-15 17:10:00";

    //Prendiamo la data di oggi
    $today = date("Y-m-d H:i:s");

    if ($today <= data_limite)
    {
    //Vuol dire che si fa in tempo a fornire la propria formazione

    echo "
    <form name=\"form_accedi\" action=\"accesso_formazione.php\" method=\"POST\" style=\"margin: 0 0 0 0px\">

    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">
    <TR>
    <TD>
    Login:
    </TD>
    </TR>

    <TR>
    <TD><INPUT TYPE=\"text\" NAME=\"login\" SIZE=\"20\" MAXLENGTH=\"20\"></TD>
    </TR>

    <TR>
    <TD>Password:</TD>
    </TR>

    <TR>
    <TD><INPUT TYPE=\"password\" NAME=\"pass\" SIZE=\"20\" MAXLENGTH=\"20\"></TD>
    </TR>

    <TR>
    <TD><INPUT TYPE=\"submit\" VALUE=\"Accedi\"></TD>
    </TR>
    </TABLE>
    ";
    }

    echo "
    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">
    <TR HEIGHT=\"20\">
    <TD></TD>
    </TR>
    </TABLE>


    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">
    <TR>";

    //Vediamo se e quali squadre sono state fornite

    DEVO INSEIRE QUA LA MIA TABELLA!!!

    $d = dir('squadre3');

    while ($s = $d->read())
    {
    if ($s != "." && $s != "..")
    {
    echo "
    <TD WIDTH=\"200\">
    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">
    <TR><TD>SQUADRA: " . substr($s, 0, -4) . "</TD></TR>
    ";

    $formazione = file('squadre3/'.$s);

    echo "<TR><TD>fornita il: " . $formazione[0] . " " . $formazione[1] . "</TD></TR>";

    for ($i=2; $i<=12; $i++)
    {
    echo "<TR><TD>" . $formazione[$i] . "</TD></TR>";
    }

    echo "<TR><TD HEIGHT=\"5\"></TD></TR>";

    echo "<TR><TD><STRONG style=\"color:blue\">PANCHINA[b]</TD></TR>";



    for ($i=13; $i<=19; $i++)
    {
    echo "<TR><TD>" . $formazione[$i] . "</TD></TR>";
    }

    echo " <TR><TD HEIGHT=\"5\"></TD></TR>
    <TR><TD>[b]Capitano: [b] " . $formazione[20] . "</TD></TR>
    <TR><TD>[b]Vice Capitano: [b]" . $formazione[21] . "</TD></TR>
    </TABLE>
    </TD>";
    }
    }

    echo "</TR></TABLE>";
    ?>
    Con i sogni possiamo conoscere il futuro...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.