Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2005, 03:31 AM
Authorized User
 
Join Date: Jan 2005
Location: , , Singapore.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session Variable

how to use session variable in dreamweaver mx.. to keep track of the user id ...

youyou
__________________
youyou
Reply With Quote
  #2 (permalink)  
Old January 19th, 2005, 03:01 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In ASP, you can use this:

Session("TheUser") = "youyou" ' to assign it

Dim theUser
theUser = Session("TheUser") ' to retrieve it.

In DW you can create a "dynamic variable" for a Session variable which you can drag and drop in your code and page, but personally, I never find it worth the trouble to create it. I always code them directly.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Falling Away With You by Muse (Track 6 from the album: Absolution) What's This?
Reply With Quote
  #3 (permalink)  
Old January 19th, 2005, 10:57 PM
Authorized User
 
Join Date: Jan 2005
Location: , , Singapore.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thks ...
so how do i retrieve the userid and put it in the home page "Hello John" when the user John had login

youyou
Reply With Quote
  #4 (permalink)  
Old January 20th, 2005, 02:49 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

With the code I showed you (assuming ASP, since you didn't specify the technology you use):

<%
Dim theUser
theUser = Session("TheUser") ' to retrieve it.
Response.Write(theUser)
%>

Or, somewhere embedded in a page:

<h1>Welcome, <%= Session("TheUser") %></h1>

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #5 (permalink)  
Old January 20th, 2005, 11:48 AM
Authorized User
 
Join Date: Jan 2005
Location: , , Singapore.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thks for ur help ....

youyou
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
session and variable... badboy1 ASP.NET 3.5 Basics 1 August 3rd, 2008 09:14 AM
Session variable anuradha80 General .NET 3 November 4th, 2004 12:39 AM
Session variable mrideout BOOK: Beginning ASP.NET 1.0 1 August 12th, 2004 07:01 PM
Session Variable mcdowell BOOK: Beginning ASP 3.0 5 June 20th, 2004 05:47 AM



All times are GMT -4. The time now is 05:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.