Good afternoon my name is Any and I am programming a database to do some surveys and I get this error:
Notice: Undefined index: id in C: \ xampp \ htdocs \ master \ modify.php on line 4
Here is the code sheet modify
<?php
require 'conexion.php';
$id = $_GET['id'];
$sql = "SELECT * FROM encuestador WHERE id_encuestador = '$id'";
$resultado = $mysqli->query($sql);
$row = $resultado->fetch_array(MYSQLI_ASSOC);
?>
<html lang="es">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<h3 style="text-align:center">MODIFICAR REGISTRO</h3>
</div>
<form class="form-horizontal" method="POST" action="update.php" autocomplete="off">
<div class="form-group">
<label for="Identificacion" class="col-sm-2 control-label">Identificacion</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="Identificacion" name="Identificacion" placeholder="Identificacion" value="<?php echo $row['Identificacion']; ?>" required>
</div>
</div>
<div class="form-group">
<label for="Nombre y Apellido" class="col-sm-2 control-label">Nombre Funcionario</label>
<div class="col-sm-10">
<input type="Nombre y Apellido" class="form-control" id="NomApeFuncionario" name="NomApeFuncionario" placeholder="NomApeFuncionario" value="<?php echo $row['NomApeFuncionario']; ?>" required>
</div>
</div>
<div class="form-group">
<label for="Entidad" class="col-sm-2 control-label">Entidad</label>
<div class="col-sm-10">
<input type="Entidad" class="form-control" id="Entidad" name="Entidad" placeholder="Entidad" value="<?php echo $row['Entidad']; ?>" >
</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a href="index.php" class="btn btn-default">Regresar</a>
<button type="submit" class="btn btn-primary">Guardar</button>
</div>
</div>
</form>
</div>
</body>
</html>
Thanks for the help in advance !!