Executing a link with conditions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
BlackJim
Forum Newbie
Posts: 1
Joined: Thu Mar 25, 2010 12:48 pm

Executing a link with conditions

Post by BlackJim »

Hi every one,

I have a next link
echo '<a href="MyPage.php">Open here</a>';

and next variable
$op = "";

I want this link to open MyPage.php if $op == "Yes";

Example
If ($op == "Yes")
{
// Open MyPage
}
Else
{
Echo "You are not allow !"
}

Thanks.
Post Reply