I have this form, but I need to use it for more users. ex for user_id=1 to submit 1 form for user_id=2 to submit another form, can you guys help?
The database table has a column u_userid where 1 = admin 2,3,4,5,6,7 is normal user, each user has more columns which I need to update data from database.
<?php
if( $_SESSION['user_id'] == '1' || $_SESSION['user_id'] == '7' )
{
echo '<hr class="mx-3 my-0">
<div class="callout callout-warning m-0 py-3">
<div>
<strong>Sas Andreea</strong>
</div>
<small class="text-muted mr-3"><i class="icon-calendar"></i>Salariu Lunar:</small>
<small class="text-muted"><i class="icon-location-pin"></i><input type="text" name="salariulunar" value="' . $row[
'salariulunar'] . '" maxlength="4" size="4"> lei
<br /> Data contract: <input type="text" name="datacontractului" maxlength="10" size="7" value="' . $row['datacontractului'] . ' ">
<br /> Datorie: <input type="text" name="datorie" value="' . $row['datorie'] . '" maxlength="4" size="4"> Lei
<br /> Salariu in avans: <input type="text" value="' . $row['salariuavans'] . ' " name="salariuavans" maxlength="4" size="4"> Lei
<br /> Zile de concediu luate: <input type="text" value="' . $row['zileconcediu'] . '" name="zileconcediu" maxlength="2" size="2"> Zile
</small>
</div>';
}
?>
<!-- Sfarsit angajat -->
<?php
if( $_SESSION['user_id'] == '1' )
{
echo '<button type="submit" name="submit" class="btn btn-sm btn-primary"><i class="fa fa-dot-circle-o" ></i> Modifica</button>';
}
?>
</form>