Activate links only for particular users [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have an interface which has a link to another page. I want this link to activate only for one user type. I have 5 user types declare at session creation. How should I do this?

Do you know php?
if($_SESSION["user_type"] == "some"){
//show the link
}

Let us call the special usertype special.You say you have declared it at the start of the session.I am assuming you did it something like $_SESSION['usertype'] = "special";.
Now if you want to activate a link only if the usertype is special, do it as follows:
if($_SESSION['usertype'] == "special")
{
echo '<p>Special link</p>';
}

Related

How to create link to user in telegram? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I need to know how to create the link to the user in telegram......
Like
Name:- $name
Username:- $username
Your id:- $userid
Link:- (what to write here)
Any one please help me to solve this.
Messages in Telegram are utilizing Markdown. So you can link to a user by id with
[John Doe](tg://user?id=12345678)
So to link to the same user anywhere else use
tg://user?id=12345678

Roundcube Login in "Tabbing" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
When I try to log in to my Roundcube install, I put in the username and then I press "Tab" to move to the password section but instead it moves to the "Login" button. Is there any way to change how a page tabs? I noticed, though, that when I enter the password first, then next "Tab" is username. I hope that I am explaining in an easy enough way to understand.
Thanks in advance.
try giving tabindex="1" to username tabindex="2" to password and tabindex="3" to Submit button.

Twig variable does not exist if the name contains underscores [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I can’t display a variable like {{foo_bar}}, but if I change the name to fooBar it works. How can I display variables that contain underscores?
I think it's okay if you display variables that contain underscores. There is no error with it.

how do i display id on page using php [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
On THIS PAGE, I have the word "category =" before my campaigns.
My problem is: I am unable to find the code that can display the page id as shown in the url.
How can I get this to echo the page id as shown in the URL? to say "category = FREE".
can someone please help me.
thank you.
echo "category = ", htmlspecialchars($_GET['id']);
Any URL parameter can be retrieved using $_GET["param_name"], in your case: $_GET["id"]. You can save that as a variable, or echo it right away.

PHP 5.2 and Smarty, Scope issue [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am trying to separate my code into functions to make it more readable.
I made a function to update a field in a database. What I am trying to do is that when they change the username it goes to update Account function then updates the session variable , the smarty var,and the database regarding the name.
Everything gets updated after the form is submitted but the smarty variable and I can't figure out why(i know its something to do with the scope) because if i declare it out of the function it works fine.
All the magic that i need fixed is in the Home portion of the routing section of my code. Thank you for any help :)
code :http://pastebin.com/VdRPz3hc

Categories