    <?php 
    
$consulta=ConsultarProducto($_GET['num']);

  function ConsultarProducto($num)
  {
    include 'conexion.php';
    $sentencia="SELECT * FROM palo WHERE num='".$num."' ";
    $resultado=$conexion->query($sentencia) or die ("Error consultar auto".mysqli_error($conexion));
    $filas=$resultado->fetch_assoc();
    return [
      $filas['num'],
      $filas['nombre'],
     


    ];

  }
  
  
    
    
    include ('menuadm.php') ?>
    <!-- Our About -->
	<section class="ulockd-about-one">
		<div class="container">
			<div class="row">
				<div class="col-sm-12 col-md-6 col-md-offset-3">
					<div class="booking_form_style1 text-center">
		                <!-- Booking Form Sart-->
			            <form id="booking_form" class="booking_form text-center" name="booking_form"  action="nuevoP2.php" method="POST" enctype= "multipart/form-data" novalidate="novalidate">
			                 <input type="hidden" name="num" value="<?php echo $_GET['num']?> ">
			                <div class="messages"></div>
							<div class="row">
				                <div class="col-sm-12">
				                	<h3>Regitro de Participantes.</h3>
				                </div>
				                <div class="col-sm-12">
				                    <div class="form-group">
										<input id="nombre" name="nombre" class="form-control"  required="required" value="<?php echo $consulta[1] ?>"  type="text">
										<div class="help-block with-errors"></div>
									</div>
				                </div>
				                    <div class="form-group">
                    				<div class="col-md-offset-3 col-md-6">
                                          <button type="submit" class="btn btn-info">GUARDAR</button>
                                          <a href='listap.php'class="btn btn-danger ">CANCELAR</a>
                                    </div>
				                </div>
			                </div>
			            </form>
					</div>
				</div>
			</div>
		</div>
	</section>

	<?php include ('pieadm.php') ?>


	
