How can I pass a php variable to a javascript function and it returns the php variable?

1

I need to make a page and with the button it increases and decreases. The page of paginador function I want to define it in head but I do not know how to do it

echo '<table border="1">';
for($i=0;$i<10;$i++){

$contador=0;
$pagina=1;

$linea = $i + (($pagina -1) * 10);

echo '<tr>';
for(;$contador<8;$contador++){


echo '<td>'. $datos[$linea][$contador]  . '<td>' ;



}

 echo '<td><form action="formularioinsertar.php"><input type="submit" value="+" /></form></td>';
echo '<td><form action="eliminar.php" method="POST">
        <input type="hidden" name="dni" value="'.$datos[$linea][0].'">
        <button name="eliminar" type="submit" default</button>

      </form></td>';


}


  echo '</tr>';
  echo '</table>';

  echo '<form name="botones"> 
      <input type="button" onClick="incrementar('.$pagina.')" value="aumentar"> 
      <input type="button" onClick="decrementar()" value="disminuir"> 
      <label> 
  <input name="boton_" type="text" > 
  </label> 
  </form> '; 
    
asked by Álvaro Girona Cutillas 10.06.2018 в 17:58
source

0 answers