1,105,288 Community Members

Hide and Show certain text box using PHP

Member Avatar
shrikanthnk
Light Poster
27 posts since Aug 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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>
Member Avatar
minitauros
Practically a Master Poster
606 posts since Apr 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 104 [?]
Skill Endorsements: 6 [?]
 
0
 

What about:

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

    ... Your textbox ...

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

?

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