-1
Good guys, I have a form uploads, where there are 6 input file
.
In my bank, I have a table called login where there are several different logins, it is possible for me to only display one input file
if the user is logged in to an X login?
Example: If the user is logged in to the "nursing" login, only display the nursing input file...
I thought I’d use IF
and ELSE
, but I don’t know how in this situation... Somebody give me a little help plss
My login file (.php security)
<?php
session_start();
if((!isset ($_SESSION['login']) == true) and (!isset ($_SESSION['senha']) == true))
{
unset($_SESSION['login']);
unset($_SESSION['senha']);
header('location:login.php');
}
$logado = $_SESSION['login'];
?>
EDIT: My form:
<?php
$codigo_relatorio = $_GET['codigo_relatorio'];
$sql = mysqli_query($link, "SELECT * FROM relatorio WHERE codigo_relatorio = '$codigo_relatorio' ");
while ($cont = mysqli_fetch_array($sql)) {
?>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Educação Física - Arquivo:</b></b></label>
<a style='color: Blue' href="uploads/uploadsed/<?php echo $cont['relatorio_educacao_fisica'];?>"><?php echo $cont['relatorio_educacao_fisica'];?></a>
<input type="file" id="file-multiple-input" name="fileed" multiple="" class="form-control-file" >
</div>
<br>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Enfermagem - Arquivo:</b></label>
<a style='color: Blue' href="uploads/uploadsenf/<?php echo $cont['relatorio_enfermagem'];?>"><?php echo $cont['relatorio_enfermagem'];?></a>
<input type="file" id="file-multiple-input" name="file" multiple="" class="form-control-file">
</div>
<br>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Nutrição - Arquivo:</b></label>
<a style='color: Blue' href="uploads/uploadsnut/<?php echo $cont['relatorio_nutricao'];?>"><?php echo $cont['relatorio_nutricao'];?></a>
<input type="file" id="file-multiple-input" name="filenut" multiple="" class="form-control-file" >
</div>
<br>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Artesanato - Arquivo:</b></label>
<a style='color: Blue' href="uploads/uploadsart/<?php echo $cont['relatorio_artesanato'];?>"><?php echo $cont['relatorio_artesanato'];?></a>
<input type="file" id="file-multiple-input" name="fileart" multiple="" class="form-control-file">
</div>
<br>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Terapia Ocupacional - Arquivo:</b></label>
<a style='color: Blue' href="uploads/uploadster/<?php echo $cont['relatorio_terapia_ocupacional'];?>"><?php echo $cont['relatorio_terapia_ocupacional'];?></a>
<input type="file" id="file-multiple-input" name="fileter" multiple="" class="form-control-file" >
</div>
<br>
<div class="form-group">
<label for="file-multiple-input" class=" form-control-label"> <b>Serviços sociais - Arquivo:</b></label>
<a style='color: Blue' href="uploads/uploadser/<?php echo $cont['relatorio_servicos_sociais'];?>"><?php echo $cont['relatorio_servicos_sociais'];}}?></a>
<input type="file" id="file-multiple-input" name="fileser" multiple="" class="form-control-file" >
</div>
</div>
Welcome to Sopt. Please add any code that is relevant for someone to analyze the problem and help them solve it. With only this image is impossible.
– tvdias
first go to the database and return the login location and make an if, for example
if ($local = "enfermagem") { <input .....}
– Ricardo Pontual
Code this form to help answer.
– Lucas Emanuel
I put the form...
– Leticía