Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 17
  1. #1

    [php]

    per mandare in output del testo in html posso fare così?

    codice:
    echo "[img]images/punto_esclamativo.gif[/img]";
    perche scrivendo così mi visualizza una pagina completamente bianca, siccome sono in un if come faccio a mandare in output del testo formattato con l'html?


    grazie

  2. #2
    scusate, mi sono dimenticato di scrivere il titolo, il titolo è: mandare testo formattato in html come output


    scusate ancora

  3. #3
    usa uan di queste due:
    codice:
    echo "<img src=\"images/punto_esclamativo.gif\" border=\"0\" height=\"26\" width=\"30\">";
    
    echo '[img]images/punto_esclamativo.gif[/img]';

  4. #4
    ho provato cosi
    codice:
    echo "<img src=\"images/punto_esclamativo.gif\" border=\"0\" height=\"26\" width=\"30\">";
    ma mi da sempre lo stesso problema

  5. #5
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    534
    dici di essere in un IF. Sicuro che la condizione per stampare l'immagine sia vera?

  6. #6
    si sono sicuro perche stampo anche un'altra cosa con
    codice:
    echo $errore;
    e mi stampa tutto correttamente,

    non riesco proprio a capire peche mi mostri una pg bianca

  7. #7
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    534
    Originariamente inviato da f.domenella
    si sono sicuro perche stampo anche un'altra cosa con
    codice:
    echo $errore;
    e mi stampa tutto correttamente,

    non riesco proprio a capire peche mi mostri una pg bianca
    come minimo se non trova l'immagine deve stampare il classico quadratino con la X. E lo dovrebbe fare nella stessa pagina. Prova a postare qualche riga attorno a quella.

  8. #8
    ti posto tutto il codice:

    codice:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <?php 
    //include("config.inc.php");
    ?>
      <meta http-equiv="Content-Language" content="it">
      <title>## Archiviation Tools ## Fototeca Comunale di Civitanova
    Marche</title>
      <meta content="text/html; charset=windows-1252"
     http-equiv="Content-Type">
    </head>
    <body leftmargin="0"
     onload="if (self != top) top.location = self.location" topmargin="2"
     style="color: rgb(0, 0, 0); background-color: rgb(0, 0, 0);"
     link="#000000" alink="#000000" vlink="#496989">
    
    
    
    <script>
    
    function checkrequired(which){
    
    var pass=true
    
    if (document.images){
    
    for (i=0;i<which.length;i++){
    
    var tempobj=which.elements[i]
    
    if (tempobj.name.substring(0,8)=="required"){
    
    if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
    
    pass=false
    
    break
    
    }
    
    }
    
    }
    
    }
    
    if (!pass){
    
    alert("NON HAI INSERITO TUTTI I DATI OBBLIGATORI PER ESSERE MEMBRI")
    
    return false
    
    }
    
    else
    
    return true
    
    }
    
    </script>
    <div align="center">
    <table style="border-collapse: collapse;" bgcolor="#5884a8" border="0"
     bordercolor="#111111" cellpadding="0" cellspacing="0" height="1"
     width="602">
      <tbody>
        <tr>
          <td colspan="2" bgcolor="#507ca0" height="1" width="786">[img]images/logo_r1_c1.jpg[/img]</td>
        </tr>
        <tr>
          <td bgcolor="#507ca0" height="1" width="205"> [img]images/logo_top_sx.gif[/img]</td>
          <td align="center" bgcolor="#5884a8" height="1" width="579">
          <p align="center"> [img]images/LOGO_2_3.gif[/img]</p>
          </td>
        </tr>
        <tr>
          <td colspan="2" height="5" width="786"><font face="Verdana"
     size="1">[img]images/bottomline.jpg[/img]</font></td>
        </tr>
      </tbody>
    </table>
    </div>
    <div align="center">
    <table leftmargin="0" border="0" cellpadding="2" cellspacing="0"
     width="768">
      <tbody>
        <form action="#" method="post"></form>
        <tr valign="ABSMIDDLE">
          <td background="images/effect_r1_c2.gif" bgcolor="#496989"
     width="150">
    
          </td>
          <td bgcolor="#496989" height="20" width="70">
    
          </td>
          <td align="center" bgcolor="#496989" height="20"
     valign="absmiddle" width="360"></td>
          <td align="right" background="images/search_bg.gif"
     bgcolor="#496989" height="20" valign="absmiddle" width="208">
    
          </td>
        </tr>
      </tbody>
    </table>
    </div>
    <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="768">
      <tbody>
        <tr>
          <td align="center" bgcolor="#000000" width="768"></td>
        </tr>
        <tr>
          <td align="center" bgcolor="#000000" width="768">
          <table bgcolor="#ffffff" border="0" cellpadding="0"
     cellspacing="0" height="401" width="66%">
            <tbody>
              <tr>
                <td style="border: 3px double rgb(66, 66, 255);"
     height="177">
                <div align="center"> <font color="#ff0000">
    <? $errore =1;
    if($errore == 1)
    	{
    	$errore_text = "Utente non riconosciuto";
    	echo "<img src=\"images/punto_esclamativo.gif\" border=\"0\" height=\"26\" width=\"30\">";
    	*/echo $errore_text;
    	
    	/*
    	echo "[img]images/punto_esclamativo.gif[/img]</font>";
    */}
    ?>
                <table border="0" cellpadding="0" cellspacing="0"
     width="92%">
                  <tbody>
                    <tr>
                      <td colspan="3">
                      <p align="center"><font size="5">Accesso alla
    Consultazione </font></p>
                      </td>
                    </tr>
                    <form method="post" action="accesso.php"
     onsubmit="return checkrequired(this)"></form>
                    <tr>
                      <td width="33%">Nome</td>
                      <td width="1%"></td>
                      <td width="60%"> <input name="requirednome" size="20"
     type="text"></td>
                    </tr>
                    <tr>
                      <td width="33%">Cognome</td>
                      <td width="1%"></td>
                      <td width="60%"> <input name="requiredcognome"
     size="20" type="text"></td>
                    </tr>
                    <tr>
                      <td width="33%">Ente</td>
                      <td width="1%"></td>
                      <td width="60%">
                      <select size="1" name="requiredente">
                      <option selected="selected">Opzioni</option>
                      <option value=""></option>
                      </select>
                      </td>
                    </tr>
                    <tr>
                      <td width="33%">Motivo della consultazione</td>
                      <td width="1%"></td>
                      <td width="60%"> <input name="requiredmotivo"
     size="40" type="text"></td>
                    </tr>
                    <tr>
                      <td colspan="3" width="96%">
                      <p align="center"> <input value="Consulta"
     name="visitatore" type="submit"></p>
                      </td>
                    </tr>
                  </tbody>
                </table>
                </div>
                </td>
              </tr>
              <tr>
                <td bgcolor="#000000"></td>
              </tr>
              <tr>
                <td style="border: 3px double rgb(66, 66, 255);">
                <table border="0" cellpadding="0" cellspacing="0"
     width="100%">
                  <tbody>
                    <tr>
                      <td>
                      <div align="center"> 
    
                      <font color="#ff0000">
    <?php
     if ($errore == 2)
     	{
    	$errore_text = "Accesso Negato";
    	/*echo "[img]images/punto_esclamativo.gif[/img]</font>";
    	echo "<font color="#ff0000">";
    	echo $errore_text;
    	echo "</font>";
    	echo "[img]images/punto_esclamativo.gif[/img]";
    */}
    ?>
                      <table border="0" cellpadding="0" cellspacing="0"
     width="92%">
                        <tbody>
                          <tr>
                            <td colspan="3">
                            <p align="center"><font size="5">Accesso
    alla Compilazione </font> [img]images/keys.gif[/img]</p>
                            </td>
                          </tr>
                          <form method="post" action="accesso.php"
     onsubmit="return checkrequired(this)"></form>
                          <tr>
                            <td width="33%">Username</td>
                            <td width="1%"></td>
                            <td width="60%"> <input name="requiredusername"
     size="20" type="text"></td>
                          </tr>
                          <tr>
                            <td width="33%">Password</td>
                            <td width="1%"></td>
                            <td width="60%"> <input name="requiredpassword"
     size="20" type="password"></td>
                          </tr>
                          <tr>
                            <td colspan="3" width="96%">
                            <p align="center"> <input value="Accedi"
     name="compila" type="submit"></p>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                      </div>
                      
    
    </p>
                      </td>
                    </tr>
                  </tbody>
                </table>
                </td>
              </tr>
            </tbody>
          </table>
          </td>
        </tr>
      </tbody>
    </table>
    </div>
    </body>
    </html>

  9. #9
    Utente di HTML.it L'avatar di saimir
    Registrato dal
    Oct 2003
    Messaggi
    52
    così come lo hai postato tu mi da errore alla line 128, devi togliere '*/' d'avanti a echo $errore_text.

    il resto funziona.

  10. #10
    strano...

    leva del tutto gli apici doppi dall'immagine:

    <img src=img.gif alt=img border=0> ecc...

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 © 2024 vBulletin Solutions, Inc. All rights reserved.