I am working with PHP and MYSQL, I have a very simple form where I have some input and a Textarea, when I edit the information of a form, my system shows me all the information in the Input but I cannot get it to show me data in the Textarea. I have done tests like changing the labels of the textarea for input and in that case if it shows me the information. I have searched in different pages and forums but I have not been able to solve it. My code is the following:
<?php
require_once('includes/load.php');
?>
<?php
$pasantia = find_by_id('pasantia',(int)$_GET['id']);
if(!$pasantia){
$session->msg("d","Missing product id.");
redirect('pasantia.php');
}
?>
<div class="panel-body">
<div class="col-md-12">
<form method="post" action="editar_pasantia.php?id=<?php echo (int)$pasantia['id'] ?>">
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-th-large"></i>
</span>
<input type="hidden" class="form-control" name="id" value="<?php echo
remove_junk($pasantia['id']);?>">
<input type="text" class="form-control" name="nombre_docente"
placeholder="Nombre del/la Profesional" value="<?php echo
remove_junk($pasantia['nombre_docente']);?>">
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-12">
<div class="input-group">
<span class="input-group-addon">
<i class="glyphicon glyphicon-pencil"></i>
</span>
<textarea class="form-control" id="observaciones" name="observaciones"
placeholder="Observaciones..." rows="6" maxlength="500" value="<?php echo
remove_junk($pasantia['observaciones']);?>"></textarea>
</div>
</div>
</div>
</div>
MY table:
1 id Primaria int(50)
2 nombre_docente varchar(50)
3 observaciones varchar(1000)
The text boxes (textarea) do not have the property
value
, only the value is put between the opening and closing tag: