Salve, mi sapete dire come mai se scrivo una frase tipo:
:-> Nuovi codici cnc nell'area "lavori".
avendo questo codice:
Codice PHP:
//Form aggiunta/modifica notizie
if($action == "aggiungi"){
$intNotizieID = @$_GET['id'];
//Controllo se prelevare informazioni
//relative a news da aggiornare...
if (!get_magic_quotes_gpc()) {
$strTitolo = addslashes($strTitolo);
}
if(strlen($intNotizieID) != 0){
//Query SQL
$strSQL = "SELECT * FROM notizie"
. " WHERE intNotizieID = $intNotizieID";
//Eseguo la query e recupero i dati
$result = mysql_query($strSQL);
$row = mysql_fetch_array($result);
//recupero dati...
$intnotizieSezioneID = $row['intSezioneID'];
$strTitolo = $row["strTitolo"];
//Libero la memoria
mysql_free_result($result);
}
?>
<script language="javascript">
function CheckForm(form){
//Avvio il controllo dei campi
var booReturn = true;
//strMessage
var strMessage = "Attenzione, compilare i seguenti campi:\n"
//Controllo
if(form.strTitolo.value == ""){
strMessage += "*Titolo\n";
booReturn = false;
}
//Ritorno booReturn
if(booReturn == false){
alert (strMessage);
}
return booReturn;
}
</script>
<h1>Aggiungi/Modifica notizie</h1>
<form method="post" action="index.php?page=notizie&action=aggiungi_2" onsubmit="return CheckForm(this);">
<input type="hidden" name="intNotizieID" value="<?php echo @$intNotizieID;?>">
Titolo:<input type="text" name="strTitolo" value="<?php echo $strTitolo;?>" size="50">
<input type="submit" value="Inserisci notizie"><input type="reset" value="Annulla Modifiche">
</form>
l'html viene fuori cosi:
Codice PHP:
<h1>Aggiungi/Modifica notizie</h1>
<form method="post" action="index.php?page=notizie&action=aggiungi_2" onsubmit="return CheckForm(this);">
<input type="hidden" name="intNotizieID" value="1">
Titolo:<input type="text" name="strTitolo" value="Nuovi codici cnc nell'area "lavori"." size="50"> // VEDETE QUI COSA VIENE FUORI //
<input type="submit" value="Inserisci notizie"><input type="reset" value="Annulla Modifiche">
</form>
Mi taglia la frase e lo mette come fosse codice html?
Mi sapete dire come mai?
grazie mille
buona giornata.