Happy Friday and happy weekend!
I have a couple of problems, one could be resolved if I pass at least two variables to the next page. One works well
link = '098usredit.php?idusr=' . $row098['98idusr'];
Of pure ambition I wanted to spend 3 but I settle for two, this is within the php
$link = '098usredit.php?idusr=' . $row098['98idusr']'&nomb=' . $row098['98nomb']'&gr=' . $row098['gr'] ; //asi no funciona pero creo que es porque no sé formar la oración GARCIA A MARZO.
echo "<tr>";
echo "<td align='center'>" . $row098['98idusr'] . "</td>";
echo "<td aling='left'>" . $row098['98nomb'] . "</td>";
echo "<td align='left'>" . $row098['gr'] . "</td>";
echo "<td align='center'><a href=\"$link\" target= _self ><img src='img/001-lapiz2.png' width='16' height='16' alt=''/></a></td>";
echo "<td align='center'></td>";
same file another topic Next page 098usredit.php
On the one hand if I can pass iduser (I can already) but also the name would avoid making an unnecessary query on this page with what would only be 2 instead of 3 as now. The problem is that to get the new user group I use a select / option that works perfectly in other pages but it is not registered and does not incorporate it into UPDATE. I transcribe the basic code, but do not challenge me. I already have the iduser or id or 98idusr and I choose in the select / option the new group
FORM
<select name="grupo" required id="grupo" form="f098" title="grupo" > <option value=""></option>
<?php $sql098b="select idgr, gr from $t98g";
$r098b=mysqli_query($mysqli, $sql098b);
while($rw098b=mysqli_fetch_array($r098b)) {
?>
<option value="<?php echo $rw098b['idgr']; ?>"><?php echo $rw098b['gr']; ?></option>
<?php } $grupo = $rw098b['idgr']; ?>
</select>
DO NOT TAKE THIS ERROR: ERROR: It is not possible to execute UPDATE 98usr SET 98group = '' WHERE 98idusr = '31 '. Incorrect integer value: '' for column '98group' at row 1
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
// verificar que el boton SUBMIT fue presionado
if(isset($_POST['bt-098']))
{
require_once '990conn.php';
// seleccionar la variable que se va a actualizar grupo = 98grupo también un número definida en la selecion
$sql098 = "UPDATE 98gr SET 98grupo = '$grupo' WHERE 98idusr='$idusr'";
if($mysqli->query($sql098) === true){
echo "El grupo fue cambiado.";
} else{
echo "ERROR: No es posible ejecutar $sql098. " . $mysqli->error;
} } }
// Close connection
$mysqli->close();
?>
In short, I see that the select is not registered as a value to pass and that frustrates me a lot. Talueguito.