1.11M Members

Hide and Show certain text box using PHP

 
0
 

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>
 
0
 

What about:

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

    ... Your textbox ...

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

?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article