Codice:
<center>
<form action="modules.php?name=Lyric&posted=yes" enctype="multipart/form-data" method=POST>
<table width="85%" border=0 cellpadding=2>
<tr>
<th align=right>Artist: </th>
<td><input type=text name=artist size=30 tabindex=0></td>
</tr>
<tr>
<th align=right>Titolo: </th>
<td><input type=text name=label size=30 tabindex=1></td>
</tr>
<tr>
<th height="147" align=right><div align="left">
<h3 align="right">Lyrics</h3>
</div></th>
<td>
<textarea name="lyric" cols="40" rows="10" tabindex="2"></textarea>
</td>
<tr>
<td colspan=2 align=center><input type="submit" value=" aGGiungi testo "><input type="reset" value="scancella">
</td>
</tr>
</table>
</form></center>
e questo
Codice:
function addcd($cdinfo) {
require_once("mainfile.php");
global $prefix;
$poba = mysql_query("SELECT * FROM nuke_cds");
$num_righe = mysql_num_rows($poba);
$id = $num_righe + 1 ;
$testo=str_replace("\n","<br>",$lyric);
if($ret=mysql_query("INSERT INTO ".$prefix."_cds VALUES ('$cdinfo[id]',
'$cdinfo[artist]',
'$cdinfo[label]',
'$cdinfo[testo]') ")){
echo" Hai inserito il testo:</h2>";
dispcdinfo($cdinfo);
} else {
echo "<p>impoSSiBBile inserire il cd nel dataBBAse($ret)</p>\n";
return;
}
}
uffa... nn funziona.... che sbaglio ???
se tolgo questo $testo=str_replace("\n","<br>",$lyric); funziona correttamente (ovviamente risistemando le variabili :P ) però non esegue la funzione di cui necessitavo a inizio thread (nl2br, strip_tags, str_replace)
dove sbaglio ?
come risolvo ??
thx, djgaggio
PS: è il caso di spostare in livello3 ? :eyes: