Get the value of an input and save it in php variable?

0

I hope and you can help me !!, I need to get the value of an input and  save it in php variable !!, this is the code I have, is commented!

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!--el id que esta en el a es dinamico, en este ejemplo lo pongo asi para no confundir, y paso el id de este a un input desde jquery con la funcion actualizar(this), posteriormente ya tengo el value de este input y requiero guardar en variable php para realizar una consulta-->
<a class=""  type="button" href=""  id="22"  onclick="actualizar(this)" >ok  </a>
 <input type='text' name='id_riesgo' class="id_riesgo" id='inries' />
<script>
   function actualizar(elemento){
 var id =elemento.id;
 var ok =$("#inries").val(id);

}

</script>
    
asked by Donaldo Manzano 29.10.2018 в 19:44
source

0 answers