Ho bisogno del vostro aiuto, perché non so come inserire i dati recuperati tramite query MySQL all'interno di un form html..
Di seguito posto il code:
codice:
<html>
<body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Modifica News</title>
</head>
<?php
include 'include/connect.php';
include 'include/bbcode_inc.php';
$id = $_REQUEST['id'];
$sql="SELECT id, nome, testo FROM news WHERE id='$id'";
$sql1=mysql_query($sql);
while ($sql_2=mysql_fetch_array($sql1))
{
$nome=$sql_2['nome'];
$testo=$sql_2['testo'];
$id_news=$sql_2['id'];
}
/*echo "
$id</p>";
echo "
$id_news</p>";
echo "
$nome</p>";
echo "
$testo</p>";*/
?>
<form action="insertnews.php" method="request">
Edita news:</p>
<label>Nome:<input type="text" name="name" value="<?php echo $nome; ?>"/></label>
<textarea cols=50 rows=10 wrap="physical" name="testo" /></textarea>
<input type="checkbox" name="validate" value="yes">
<input type="submit" name="invia" value="INVIA" />
</form>
</body>
</html>
Da un file precedente (che lista l'elenco delle news), recupero l'id della news che passo a questo file php. Riesco tramite query a recuperare tutti i dati, infatti dagli echo che ho commentato, visualizzo tutto correttamente, ma non so come passare il testo al campo textarea del form.. come faccio?