-1
The form with the textboxes is not being shown
$session_Nome = $_SESSION['nome'];
$servername = "localhost";
$username = "root";
$password = "";
$db = "aeac";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $db);
//Check connection
if (!$conn) {
die("Falha na ligação: " . mysqli_connect_error());
}
else {
$sqla = "SELECT * FROM admin WHERE $session_Nome='username_Admin'";
$result = mysqli_query($conn, $sqla);
if ($result) {
while($rowa= mysqli_fetch_assoc($result))
{
echo 'Nome: <input required type="text" name="nome" value="<?php echo $session_Nome; ?>"style="width: 300px;"><br><br><br>
Email: <input required type="email" name="email" value="<?php echo $rowa["email"]; ?>"style="width: 300px;"><br><br><br>
Senha: <input required type="password" name="password" value="<?php echo $rowa["password_Admin"]; ?>"style="width: 300px;"><br><br><br>';
}
}
}
change that line
$rowa= mysqli_fetch_assoc($result);
forwhile($rowa= mysqli_fetch_assoc($result))
– Wees Smith
I still have the same problem
– RedCandy
Why are you wearing
<?php
within theplicas
? whenever printing a php variable inside a string use the quotesduplas
.<?php echo "Bla bla $minhastring[qualquercoisa] "; ?>
– lazyFox
@Iazyfox, Ta using yes
– Wees Smith
@Redcandy which is line 86?
– Wees Smith
The 86 line is Email:'<input required type="email" name="email" value="<? php echo $rowa["email"]; ? >"style="width: 300px;"><br><br><br><br>
– RedCandy
At the moment you are not displaying the form, so I think it is problems in the query?
– RedCandy
Put a var_dump of the $sqla variable
– Leonardo Barros
string(51) "SELECT * FROM admin WHERE Redcandy='username_Admin'"
– RedCandy