1
As I don’t know much about javascript I need a help to make this script bottom work
What I need is that when selecting a RADIO it autocompletes the input text with the value contained in the corresponding RADIO.
Noting that in the RADIOS Value I put 3 variables separated by a transfer and the variable and be completed can only be the "$value"
$sql56 = $bd->prepare( "SELECT * FROM plt where id_paciente = ? AND
(status = ? OR status = ? ) " ) or exit( $mysqli->error );
$sql56->bind_param('iss', $id_paciente,$statusplt,$statusplt2); // Coloca o
valor de $data no lugar da primeira interrogação (?)
$sql56->execute();
$resultcar56 = $sql56->get_result();
while( $row = $resultcar56->fetch_assoc() )
{
$valor = $row['valor'];
$id_plt = $row['id_plt'];
$tipo_servico = $row['tipo_servico'];
echo"<input type='radio' name='id_plt' value='<?php $id_plt-$tipo_servico-$valor?>'>";
echo"<input type='radio' name='id_plt' value='<?php $id_plt-$tipo_servico-$valor?>'>";
echo"<input type='radio' name='id_plt' value='<?php $id_plt-$tipo_servico-$valor?>'>";
}
<input type="text" name="valor_original" id="valor" placeholder="" value="0" />