Forums
This topic is locked
Passing Images
Posted 05 Sep 2001 20:57:48
1
has voted
05 Sep 2001 20:57:48 Kathy Byrd posted:
Hello,OK here is it is:
You log in (login.asp)
You get to the main page (main.asp)
Session calls your username and has a msg for you like "Hello, Kathy!" And it would also have an image for you and/or your comapnay. (logo)
Now, I can get everything but the logo for each person to come up. How the heck do I do this? I have it in VBScript, and am using the dynmic image, but it is not passing the user ID or anything. And I am using the move to specific record, and this is so not working.
HELP PLEASE
THank you
Kathy
Replies
Replied 05 Sep 2001 22:21:02
05 Sep 2001 22:21:02 Joel Martinez replied:
well, probably the easiest thing to do, is to get the persons image URL when they log in, and make that a session variable.
then that way, it will always be there, and you wont have to hit the DB everytime.
if you're using the Server Behaviors, and don't know how you would hand code that, then you can do this:
on the page it goes to after it logs in... make a recordset query that uses the username as the criteria, and select any data that you want to include in sessions, then just assign as you wish<pre id=code><font face=courier size=2 id=code>session("imageurl" = recordset1.fields("imageurl".value</font id=code></pre id=code>
Joel Martinez [ ]
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
'2nd place is just 1st Loser
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
then that way, it will always be there, and you wont have to hit the DB everytime.
if you're using the Server Behaviors, and don't know how you would hand code that, then you can do this:
on the page it goes to after it logs in... make a recordset query that uses the username as the criteria, and select any data that you want to include in sessions, then just assign as you wish<pre id=code><font face=courier size=2 id=code>session("imageurl" = recordset1.fields("imageurl".value</font id=code></pre id=code>
Joel Martinez [ ]
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
'2nd place is just 1st Loser
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 05 Sep 2001 22:53:56
05 Sep 2001 22:53:56 Kathy Byrd replied:
Hello,
Well I would like to say that was as easy as it should be. But I am doing all that and it is still not working. I am at a lose here. I know it can be done I have seen it. So I really do not know what to do next.
Kathy
Well I would like to say that was as easy as it should be. But I am doing all that and it is still not working. I am at a lose here. I know it can be done I have seen it. So I really do not know what to do next.
Kathy
Replied 05 Sep 2001 23:44:41
05 Sep 2001 23:44:41 Joel Martinez replied:
well, unfortunately I'm working with limited information about your situation here, but you should be able to find out what the problem is by using some debugging.
after you set the session variable, try outputting the value on the screen... either by dragging the value from the data source floater, or by typing this code<pre id=code><font face=courier size=2 id=code><%=session("name"%></font id=code></pre id=code>of course replacing "name" with whatever you named it...
either the value is coming through or not... if it is, then you need to work on the image tag that you're putting the value into.
if it's not, then you need to work on the recordset that gets the data to make sure it does..
hope that helps,
Joel Martinez [ ]
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
'2nd place is just 1st Loser
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
after you set the session variable, try outputting the value on the screen... either by dragging the value from the data source floater, or by typing this code<pre id=code><font face=courier size=2 id=code><%=session("name"%></font id=code></pre id=code>of course replacing "name" with whatever you named it...
either the value is coming through or not... if it is, then you need to work on the image tag that you're putting the value into.
if it's not, then you need to work on the recordset that gets the data to make sure it does..
hope that helps,
Joel Martinez [ ]
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
'2nd place is just 1st Loser
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
Replied 05 Sep 2001 23:56:10
05 Sep 2001 23:56:10 Kathy Byrd replied:
hi,
Well, I am thinking that it may have to do with the recordset. Although, that does not seem to be working as well. Here is a sample of my recordset:
SELECT *
FROM Register
Where Logos = 'strLogos'
strLogos xyz session("Logos"
Now that does not work. Here is the code that is calling the dynamic image:
<img src="<%=(rsregister.Fields.Item("Logos".Value)%>">
And I am using the Move To Specific Record (behavior) with all this.
What am I missing?
Hope this is a better idea.
Thank you
Kathy
Well, I am thinking that it may have to do with the recordset. Although, that does not seem to be working as well. Here is a sample of my recordset:
SELECT *
FROM Register
Where Logos = 'strLogos'
strLogos xyz session("Logos"
Now that does not work. Here is the code that is calling the dynamic image:
<img src="<%=(rsregister.Fields.Item("Logos".Value)%>">
And I am using the Move To Specific Record (behavior) with all this.
What am I missing?
Hope this is a better idea.
Thank you
Kathy