Boas
Estou com um problema, que é o seguinte:
Com isto, queria que ao alterar o valor da textarea TEXTO_NOVIDADES2, quando fizesse o submit, ele passasse o valor que escrevi e não o valor que estava antes, o $texto4.
A receber, está este código:
Como posso fazer?
Estou com um problema, que é o seguinte:
Código:
<form method='POST' action='teste.php'>
<table width="244" height="176">
<tr>
<td width="281" height="170" class="style3"> <table width="236" height="119">
<tr>
<td><span class="style4">Novidades 2:</span></td>
</tr>
<tr>
<td width="228">
<textarea name="texto_novidades2" cols="35" rows="6">
<?php echo $texto4; ?>
</textarea></td>
</tr>
<tr> </tr>
</table>
<table width="56" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
</table>
<input name="grava4" type='submit' id="grava4" value='Gravar' align="right"/></td>
</tr>
</table>
</form>
A receber, está este código:
PHP:
$novitemp2= $_POST['texto_novidades2'];
// connect to db
$conn = db_connect();
$result2 = $conn->query("update administrador set texto_novidades2='$novitemp2'");