Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    non scrivermi questa stringa se...

    Buongiorno a tutti.

    Sto programmando un guestbook e nel form vi è anche un campo di inserimento per l'indirizzo web con il valore iniziale di "http:// "

    Arrivato a questo punto io mi ritrovo con queste stringhe di codice:

    ELSE IF ($variable == "Indirizzo Web")
    {
    echo ("<tr>\n<td width=100>\n$variable:\n</td>\n<td width=400>\n<A HREF=\"$value\" target=\"_blank\">$value</a>\n</td>\n</tr>\n");
    }

    ma io vorrei che se il valore del campo "Indirizzo Web" rimanesse solamente "http://", quindi senza ulteriori inserimenti dell'indirizzo, non mi scrivesse la stringa "Indirizzo Web: http// "

    Come fare?
    Spero di essere stato ben chiaro, altrimenti chiedete ulteriori spiegazioni
    "High tecnology doesn't mean high creativity"

  2. #2
    ELSE IF ($variable == "Indirizzo Web" && $value!='http://')
    {
    echo ("<tr>\n<td width=100>\n$variable:\n</td>\n<td width=400>\n<A HREF=\"$value\" target=\"_blank\">$value</a>\n</td>\n</tr>\n");
    }

    (con && $value!='http://')
    visitate http://camicio.altervista.org per caxxate varie :d

  3. #3
    Grazie per la risposta camicio109, però vorrei che se il valore dell'indirizzo rimenesse inalterato (quindi: http://) la stringa non me la scrivesse per niente.

    In conclusione: se il valore dell'indirizzo web è diverso da "http://" mi fai vedere la stringa (echo ("<tr>\n<td width=100>\n$variable:\n</td>\n<td width=400>\n<A HREF=\"$value\" target=\"_blank\">$value</a>\n</td>\n</tr>\n");
    )
    altrimenti non me la fai vedere

    Capito?
    Grazie!
    "High tecnology doesn't mean high creativity"

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.