Jump to content

pacojr10

New Members
  • Posts

    1
  • Joined

  • Last visited

pacojr10's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I get a 406 not acceptable error when I post to my mysql db a string containing "https://..... The strange thing is that I only get it on one of the values, but it accepts it on another field. The field it accepts with any value including the above is for the video field which is weird. But for the "archivo" field it would not let me add the value and it gives me the error. This is the complete error: 406 Not acceptable //page title Not Acceptable //pageAn appropriate representation of the requested resource /ccr/clases.php could not be found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. please help, here is my code: <?php if(isset($_POST['Guardar'])){ $semana=$_POST['semana']; $video=$_POST['video']; $archivo=$_POST['archivo']; $nombre=$_POST['nombre']; $leccion=$_POST['leccion']; //verificar si la semana ya existe $existe=mysql_num_rows(mysql_query("SELECT semana FROM `clases` WHERE semana='$semana'")); if($existe==0){ mysql_query("INSERT INTO clases VALUES('$semana','$nombre','$archivo','$leccion','$video')"); } else{ mysql_query("UPDATE `clases` SET `nombre`='$nombre', `archivo`='$archivo', `nombre_leccion`='$leccion', `video`='$video' WHERE `semana`='$semana';"); } header("Location: clases.php"); } ?> <button type="button" class="btn btn-inverse" data-toggle="collapse" data-target="#demo">AGREGAR</button> <div id="demo" class="collapse"> <form class="form-horizontal" action="" method="post"> <div class="control-group"> <label class="control-label" for="inputEmail">NOMBRE:</label> <div class="controls"> <input class="input-xxlarge" type="text" name="nombre" id="nombre" placeholder="NOMBRE"> </div> </div> <div class="control-group"> <label class="control-label" for="inputEmail">VIDEO:</label> <div class="controls"> <input class="input-xlarge" type="text" name="video" id="video" placeholder="URL VIDEO"> </div> </div> <div class="control-group"> <label class="control-label" for="inputEmail">LECCIÓN:</label> <div class="controls"> <input class="input-xlarge" type="text" name="leccion" id="leccion" placeholder="NOMBRE DE LECCIÓN"> </div> </div> <div class="control-group"> <label class="control-label" for="inputEmail">ARCHIVO:</label> <div class="controls"> <input class="input-xxlarge" type="text" name="archivo" id="archivo" placeholder="URL ARCHIVO"> </div> </div> <div class="control-group"> <label class="control-label" for="inputEmail">SEMANA:</label> <div class="controls"> <select name="semana" id="semana" class="span2"> <?php for($i=1;$i<=52;$i++){ ?> <option value="<?php echo $i; ?>"><?php echo $i; ?></option> <?php } ?> </select> </div> </div> <div class="control-group"> <div class="controls"> <button type="submit" name="Guardar" class="btn btn-primary">Guardar</button> </div> </div> </form> <div id="resultado"></div> </div> </div> <?php } //fin si es administrador?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.