close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Hide a Link

Thread began 10/03/2011 11:06 am by Sly Verano | Last modified 10/05/2011 11:03 am by Sly Verano | 783 views | 4 replies |

Sly Verano

Hide a Link


I have my s_profile.php, when I log-in to my account and go to the s_profile.php,. there is

a there "Send a Private Message". I want to hide that send private message because

when I clicked that linked. I will send a private message to my self. So to avoid that. I

want to hide that linked.

But, when I search my classmate profile page(s_profile.php), the linked "Send a Private

Message" will appear. So that I can send a private message to my classmate.


How can I do this ?

Thank you in Advanced.

Sign in to reply to this post

Jason ByrnesWebAssist

when a user logs in, their ID is stored in a session.

you need to use an if statement to compare the userID session variable with the UserID from the recordset on the s_profile.php page, for example:

<?php if($_SESSION['IdSession'] != $row_recordsetName['IdColumn']) { ?>

<link code here>
<?php ?>

where IdSession is the name of the session variable and IdColumn is the name of the ID column in the users table

Sign in to reply to this post

Sly Verano

Hi Jason,

I followed your suggestion. here is the blocked of codes.

  <?php if($_SESSION['SecurityAssist_studStudentID'] != $row_rs_stud['studStudentID']) { ?>

<a href="s_mail.php?studStudentID=<?php echo $row_rs_Student['studStudentID']; ?>"><img src="../images/icons/Mail_16.png" border="0" alt="" width="16" height="16" align="absmiddle" /> Send <?php echo $row_rs_Student['studStudentFirstName']; ?>'s a Private Message</a>

<?php } ?>  


when I view my profile_page.php the link disappear. but when I search and check the

profile of my classmates the link is also disappear.

How was that ?

Sign in to reply to this post

Jason ByrnesWebAssist

try adding the following at line 1:

<?php @session_start(); ?>

if that still does not work, to troubleshoot the problem, change:

<?php if($_SESSION['SecurityAssist_studStudentID'] != $row_rs_stud['studStudentID']) { ?>


<?php echo("SecurityAssist_studStudentID: "$_SESSION['SecurityAssist_studStudentID']."<br />studStudentID: ".$row_rs_stud['studStudentID'].""); ?>

if($_SESSION['SecurityAssist_studStudentID'] != $row_rs_stud['studStudentID']) { ?>

and post back the value for each variable that is written to the page.

Sign in to reply to this post

Sly Verano

Hi Jason,.

Thanks a lot ... It's working :)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...