I need to add a text that I define in a textarea that is at the end of the code but when wanting to enter it for the first time I get an indefinite variable as I do to correct this attached code
<?php
session_start();
if (!isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] != 1 or
$_SESSION['user_permision'] != "Administrador")
{
header("location: login.php");
exit;
}
require_once ("config/db.php");
require_once ("config/conexion.php");
$active_ticket="active";
$title="Prestamos | Simple Stock";
$Nticket= $_GET['Nticket'];
$incidencia= $_GET['incidencia'];
$tema= $_GET['tema'];
$detalle= $_GET['detalle'];
$firstname= $_GET['firstname'];
$text = $_POST['editor'];
?>
<html>
<head>
<?php include("head.php");
include("navbarhelp.php");?>
<script src="ckeditor/ckeditor.js"></script>
</head>
<body>
<div class="subject">Asunto:<strong><?php echo $tema; ?></strong></div>
<div id="ticketThread">
<table class="thread-entry message" cellspacing="0"
cellpadding="1"width="800" boder="0">
<tbody>
<tr>
<th>
<div>
<span class="textra"></span>
<span><?php echo $firstname; ?></span>
</div>
</th>
</tr>
<tr>
<td class="thread-body"><div><?php echo $detalle ?></div></td>
</tr>
</tbody>
</table>
<table class="thread-entry response" cellspacing="0" cellpadding="1"
width="800" border="0">
<tbody>
<tr>
<th>
<div>
Respuesta <span class="textra"></span>
<span></span>
</div>
</th>
</tr>
<tr><br>
<td class="thread-body"><br><div><?php echo $text ?><br>
</div></td></tr>
</tbody></table></div>
<form action="respuestas.php?Nticket=<?php echo $Nticket?>&incidencia=<?
=$incidencia?>&tema=<?=$tema?>&detalle=<?=$detalle?>&firstname=<?
=$firstname?>"
method="POST">
<textarea class="ckeditor" name="editor"></textarea>
<input type="submit" value="Respuesta">
</form>
</body>
<?php
if(isset($_POST['editor'])){
$text = $_POST['editor'];
$query = mysqli_query($con, "UPDATE ticket SET Respuesta='".$text."'
WHERE Nticket='".$Nticket."'");
}
?>
this is before entering a value
and after entering a value in the textarea