close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Server Variable Variable Member ID

Thread began 10/07/2009 3:21 pm by info271221 | Last modified 10/09/2009 11:11 am by Eric Mittman | 1984 views | 4 replies |

info271221

Server Variable Variable Member ID

I want to pass the server variable in for the logged in member so that when they click on Update Profile from the Members Only page they can access their member id.
It keeps pulling up user 658 when I am logged in as 5.

Sign in to reply to this post

info271221

OOPS, Here is my zip file

Please help! Thanks

Sign in to reply to this post

Eric Mittman

On the login page are you storing the id for the current user in a session variable? If you are using Security Assist this would be in the last page of the server behavior for Authenticate User.

With the session variable being set over here you just need to filter your recordset for the users on this variable when they go to the update page. On the current update page members_directory_Update_profile it looks like you are filtering the recordset on the URL parameter for id, you should update this to filter on the session variable from your Authenticate User server behavior or wherever the session variable comes from.

Sign in to reply to this post

info271221

Member Update Profile

Here is the statement on the profile page which is the page that we want to pass the id into from the members_only.php

You can log in with waTest / waTest to test.

member_directory_Profile.php

<?php
$Paramid_WAATKmemberdirectory = "-1";
if (isset($_SESSION['id'])) {
$Paramid_WAATKmemberdirectory = (get_magic_quotes_gpc()) ? $_SESSION['id'] : addslashes($_SESSION['id']);
}
mysql_select_db($database_wibuckbear, $wibuckbear);
$query_WAATKmemberdirectory = sprintf("SELECT * FROM member_directory WHERE id = %s", GetSQLValueString($Paramid_WAATKmemberdirectory, "int"));
$WAATKmemberdirectory = mysql_query($query_WAATKmemberdirectory, $wibuckbear) or die(mysql_error());
$row_WAATKmemberdirectory = mysql_fetch_assoc($WAATKmemberdirectory);
$totalRows_WAATKmemberdirectory = mysql_num_rows($WAATKmemberdirectory);
?>

I have zipped and attached the members, security assist folders and the members only page.
Thanks!

Sign in to reply to this post

Eric Mittman

This query looks good to me, so long as you are storing the currently logged in users id in a session variable called id then this should work. You would set this variable in your authenticate user server behavior on the login page. I did not see any attachments to your last post. If you are still having trouble with this please post back with a copy of the login page.

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

Content

rating

Layout

rating

Ease of use

rating

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...