隐藏/显示特定用户的表单

时间:2013-05-20 06:40:22

标签: php forms hide show

我不想向管理员用户显示特定表单,但我不想为其他用户隐藏表单。我尝试过evrything但它不起作用。

代码:

<?php if($user_profile['id']=='562004018'){ ?> //show form for this user
            <div class="span4">
            <form method="post" action="">
                <fieldset>
                <legend>Make a new Project</legend>
                    <label>Title</label>
                    <input type="text" name="project_naam" placeholder="Put here your Project Name...">
                    <input name="submit" type="submitproject" class="btn" value="Save">
                </fieldset>
                </div>
        <?php  } else {?>
        <div class="NoScript">
        <div class="span4">

            <form method="post" action=""> // hide form for this kind of users
                <fieldset>
                <legend>Make a new Project</legend>
                    <label>Title</label>
                    <input type="text" name="project_naam" placeholder="Put here your Project Name...">
                    <input name="submit" type="submitproject" class="btn" value="Save">
                </fieldset>
                </div>
                </div>
        <?php } ?>

代码:

 <style>

   .NoScript 
    { 
    visibility: hidden; 
    }
   </style>

0 个答案:

没有答案