Forums: Hide Fields depending on users - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hide Fields depending on users

#1 User is offline   dara 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 28-October 10

Posted 29 November 2010 - 09:55 PM

Hello i need your help,
i want to create a user for my phprunner website and i need this user to be able to see only some fields.
so i start writting something but i dont get it to work correctly
:


$userid = $_SESSION["UserID"];
echo $userid;
if (($userid="stanislas"));
{
$xt->assign("mobile1_fieldblock",false);
$xt->assign("nom1_fieldblock",false);
$xt->assign("prenom1_fieldblock",false);
$xt->assign("mail1_fieldblock",false);

print_r ($_SESSION["UserID"]);
}
if (($userid="olivier"));
{
$xt->assign("mobile1_fieldblock",true);
$xt->assign("nom1_fieldblock",true);
$xt->assign("prenom1_fieldblock",true);
$xt->assign("mail1_fieldblock",true);

print_r ($_SESSION["UserID"]);
}





Thanks all for your help
0

#2 User is offline   dara 

  • Member
  • PipPip
  • Group: Members
  • Posts: 15
  • Joined: 28-October 10

Posted 29 November 2010 - 10:14 PM

ok i managed to do what i want while watching this wonderfull barcelona -real madrid 5-0!!
i was wondering if there is a way to do that without php code directly with phprunner ?
0

#3 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 16044
  • Joined: 03-February 03

Posted 30 November 2010 - 01:01 AM

No, this won't be possible without PHP coding.
Best regards,
Sergey Kornilov
0

#4 User is offline   edgarv 

  • Member
  • PipPip
  • Group: Members
  • Posts: 24
  • Joined: 03-August 07

Posted 01 August 2011 - 08:08 PM

View Postadmin, on 29 November 2010 - 08:01 PM, said:

No, this won't be possible without PHP coding.

I am interested in hearing how you were able to do this, trying to do the same in ASP
0

#5 User is offline   Abhijeet 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 66
  • Joined: 14-September 09

Posted 18 November 2012 - 03:43 AM

Hello Team,

I want to have the same functionality but not on the basis of user name. I need to have it on the basis of user type. Can you please help me how to proceed the same code with user type ? I mean registered user, guest user, etc.

Thank you in advance.

View Postedgarv, on 02 August 2011 - 01:38 AM, said:

View Postadmin, on 29 November 2010 - 08:01 PM, said:

No, this won't be possible without PHP coding.

I am interested in hearing how you were able to do this, trying to do the same in ASP

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic