Avrei un problema con due form.
codice:
<?
$obj->connessione();
$dati=mysql_query("select * from commenti where id_art='$id' order by data desc");
while($array=mysql_fetch_array($dati)){
echo"$array[data] da";
echo"< href=mailto:$array[utente]>$array[utente]</>
";
echo"$array[commento]
";
}
?>
<input type="button" vlue="link" onclick="document.theform.commento.innerHTML+='
view sourceprint?
1.
'">
<input type="button" vlue="codice" onclick="document.theform.commento.innerHTML+='
view sourceprint?
1.
'">
<input type="button" vlue="grassetto" onclick="document.theform.commento.innerHTML+=''">
<form method="post" action="savecomment.php" name="theform">
<input type="hidden" value="<?echo $id;?>" name="idart" >
Emil :<input type="text" value="" name="email">
Commento:
<textarea rows=13 cols=60 name="commento"></textarea>
<input type="submit" vlue="Inserisci">
</form>
Questa è la pagina nel sito: [URL rimosso su richiesta dell'utente]
codice:
<?
$data= date("d/m/y",time());
$new=$commento;
$new=str_replace("<?","∓lt;?",$new);
$new=str_replace("<?php","∓lt;?php",$new);
$new=str_replace("<","∓lt;",$new);
$new=str_replace("
view sourceprint?
1.
","< href=",$new);
2.
$new=str_replace("
",">link</>",$new);
$new=str_replace("
view sourceprint?
1.
","<p clss=codice>",$new);
2.
$new=str_replace("
","</p>",$new);
$new=str_replace("","",$new);
$new=str_replace("","",$new);
$new = ereg_replace("\n","
",$new);
$dti=mysql_query("insert into commenti(data,id_art,commento,utente) vlues ('$data','$idart','$new','$email')");
?>
Questa è la pagina di questo codice nel sito: [URL rimosso su richiesta dell'utente]
Cosa c'è di sbagliato in entrambi? Come lo sistemo?