Hello,

please update the code to get below mentioned output.

when user role is admin display text box. else hide the text box. kindly update the code so as to get desired output.

<? php
......
....

 $role= $_SESSION['role']

?>


<form>
<input type="text" name="bankaccount" value=""/>
</form>

What about:

<?php
if($role == 'admin')
{
    ?>

    ... Your textbox ...

    <?php
}
else
{
    // No textbox.
}

?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.