Hi, I have a rather puzzling problem, have asked the ASP experts at work with
no joy and its driving me mad! I'll explain the steps in more detail below
but the general problem is I am manually creating a datetime value in my asp
pages that I am putting in a session. Now this isn't being passed from page
to page while other session objects are. There is no reason I can see for
this happening.
The steps I am using are:
page1.asp - A form where the user selects a time from a drop down menu that
then passes a value in the form to the next page
<select name="timeselec tion" class="formelem ents" id="timeselecti on">
<option value="6/21/2004 12:00:00">12:00 </option>
<option value="6/21/2004 12:30:00">12:30 </option>
<option value="6/21/2004 13:00:00">13:00 </option>
<option value="6/21/2004 13:30:00">13:30 </option>
<option value="6/21/2004 14:00:00">14:00 </option>
<option value="6/21/2004 14:30:00">14:30 </option>
<option value="6/21/2004 15:00:00">15:00 </option>
</select>
page2.asp - The page asks the user to login or register. It posts back to
itself to check the username and password is correct. If I write out
Session("timese lection") it displays perfectly
timeselection = Request.Form("t imeselection")
Session("timese lection") = timeselection
If Request.Form("u sername") <> "" THEN
formname = Request.Form("u sername")
formpass = Request.Form("p assword")
sSQL = "SELECT tbl_user.fld_us er_uid, tbl_user.fld_fi rstname,
tbl_user.fld_su rname, tbl_user.fld_em ail, tbl_user.fld_us ername FROM tbl_user
WHERE tbl_user.fld_us ername='"&formn ame&"' AND
tbl_user.fld_pa ssword='"&formp ass&"'" Set Rs = Con.Execute(sSQ L)
IF rs.EOF AND rs.BOF THEN
ELSE
Session("name") = Rs("fld_firstna me")
Session("custid ") = Rs("fld_user_ui d")
Session("Authen ticated") = "1"
Response.Redire ct("/confirm.asp")
END IF
ELSE
END IF
page3.asp - Should display the confirmation details from the past selections.
All the sessions work apart from the timeselection, it just appears blank. If
I add a bit of text to timeselecion when i declare the session this appears
so it is passing something through. Its driving me mad!
timeselection = Session("timese lection")
custname = Session("name")
'in body works
=(name)
'doesn't display
=(timeselection ) 4 1637
Do you mean that if you try something like :
timeselection="[" & Request.form("t imeselection") & "]"
on your postback it will be seen as "[]" in the confirmation page ?
It looks like that Request.Form("t imeselection") is empty. Could it be
outside of the form tag ? Display Request.Form to see if its part of the
posted data...
Patrice
--
"bateman" <ba********@nos pam.hotmail.com > a écrit dans le message de
news:er******** *****@tk2msftng p13.phx.gbl... Hi, I have a rather puzzling problem, have asked the ASP experts at work
with no joy and its driving me mad! I'll explain the steps in more detail below but the general problem is I am manually creating a datetime value in my
asp pages that I am putting in a session. Now this isn't being passed from
page to page while other session objects are. There is no reason I can see for this happening.
The steps I am using are:
page1.asp - A form where the user selects a time from a drop down menu
that then passes a value in the form to the next page
<select name="timeselec tion" class="formelem ents" id="timeselecti on"> <option value="6/21/2004 12:00:00">12:00 </option> <option value="6/21/2004 12:30:00">12:30 </option> <option value="6/21/2004 13:00:00">13:00 </option> <option value="6/21/2004 13:30:00">13:30 </option> <option value="6/21/2004 14:00:00">14:00 </option> <option value="6/21/2004 14:30:00">14:30 </option> <option value="6/21/2004 15:00:00">15:00 </option> </select>
page2.asp - The page asks the user to login or register. It posts back to itself to check the username and password is correct. If I write out Session("timese lection") it displays perfectly
timeselection = Request.Form("t imeselection") Session("timese lection") = timeselection
If Request.Form("u sername") <> "" THEN formname = Request.Form("u sername") formpass = Request.Form("p assword") sSQL = "SELECT tbl_user.fld_us er_uid, tbl_user.fld_fi rstname, tbl_user.fld_su rname, tbl_user.fld_em ail, tbl_user.fld_us ername FROM
tbl_user WHERE tbl_user.fld_us ername='"&formn ame&"' AND tbl_user.fld_pa ssword='"&formp ass&"'" Set Rs = Con.Execute(sSQ L) IF rs.EOF AND rs.BOF THEN ELSE Session("name") = Rs("fld_firstna me") Session("custid ") = Rs("fld_user_ui d") Session("Authen ticated") = "1" Response.Redire ct("/confirm.asp") END IF ELSE END IF
page3.asp - Should display the confirmation details from the past
selections. All the sessions work apart from the timeselection, it just appears blank.
If I add a bit of text to timeselecion when i declare the session this
appears so it is passing something through. Its driving me mad!
timeselection = Session("timese lection") custname = Session("name")
'in body works =(name) 'doesn't display =(timeselection )
"Patrice" <no****@nowhere .com> wrote in news:OCegOi5UEH A.2484
@TK2MSFTNGP11.p hx.gbl: Do you mean that if you try something like : timeselection="[" & Request.form("t imeselection") & "]" on your postback it will be seen as "[]" in the confirmation page ?
It looks like that Request.Form("t imeselection") is empty. Could it be outside of the form tag ? Display Request.Form to see if its part of the posted data...
Patrice
If I do something like
Session("timese lection") = "[" & Request.form("t imeselection") & "]"
timeselection = Session("timese lection")
on the page I declare it it will display [6/21/2004 15:00:00] if I
Response.Write (timeselection) however on the next page if I do
timeselection = Session("timese lection")
Response.Write (timeselection)
it will dispaly []
When you display the login form on page2.asp include a hidden form field for
timeselection. What is happening is that when page1 posts to page2
"timeselect ion" has a value. When page2 posts to itself there is no
"timeselect ion" form element so the timeselection variable is set to "" (or
empty?).
--
Mark Schupp
Head of Development
Integrity eLearning www.ielearning.com
"bateman" <ba********@nos pam.hotmail.com > wrote in message
news:er******** *****@tk2msftng p13.phx.gbl... Hi, I have a rather puzzling problem, have asked the ASP experts at work
with no joy and its driving me mad! I'll explain the steps in more detail below but the general problem is I am manually creating a datetime value in my
asp pages that I am putting in a session. Now this isn't being passed from
page to page while other session objects are. There is no reason I can see for this happening.
The steps I am using are:
page1.asp - A form where the user selects a time from a drop down menu
that then passes a value in the form to the next page
<select name="timeselec tion" class="formelem ents" id="timeselecti on"> <option value="6/21/2004 12:00:00">12:00 </option> <option value="6/21/2004 12:30:00">12:30 </option> <option value="6/21/2004 13:00:00">13:00 </option> <option value="6/21/2004 13:30:00">13:30 </option> <option value="6/21/2004 14:00:00">14:00 </option> <option value="6/21/2004 14:30:00">14:30 </option> <option value="6/21/2004 15:00:00">15:00 </option> </select>
page2.asp - The page asks the user to login or register. It posts back to itself to check the username and password is correct. If I write out Session("timese lection") it displays perfectly
timeselection = Request.Form("t imeselection") Session("timese lection") = timeselection
If Request.Form("u sername") <> "" THEN formname = Request.Form("u sername") formpass = Request.Form("p assword") sSQL = "SELECT tbl_user.fld_us er_uid, tbl_user.fld_fi rstname, tbl_user.fld_su rname, tbl_user.fld_em ail, tbl_user.fld_us ername FROM
tbl_user WHERE tbl_user.fld_us ername='"&formn ame&"' AND tbl_user.fld_pa ssword='"&formp ass&"'" Set Rs = Con.Execute(sSQ L) IF rs.EOF AND rs.BOF THEN ELSE Session("name") = Rs("fld_firstna me") Session("custid ") = Rs("fld_user_ui d") Session("Authen ticated") = "1" Response.Redire ct("/confirm.asp") END IF ELSE END IF
page3.asp - Should display the confirmation details from the past
selections. All the sessions work apart from the timeselection, it just appears blank.
If I add a bit of text to timeselecion when i declare the session this
appears so it is passing something through. Its driving me mad!
timeselection = Session("timese lection") custname = Session("name")
'in body works =(name) 'doesn't display =(timeselection )
For now I would say that :
1) you save the correct value and displayt that value ("[MM/DD/YYYY]")
2) for some reason you go again on this page but without form values (and
you save "[]")
3) you redirect to the confirmation page that displays "[]"
For now it looks like to me you are hitting twice the
Session("timese lection") = "[" & Request.form("t imeselection") & "]" (and
the latter one wihtout anything in Request.Form("t imeselection").
Especially I noticed that the timeselection session var is always defined in
your code while the other session variables are defined in an if branch.
Double check your processing flow. Make sure you don't erase the session
variable by another incorrect value (you could output its value before
assignation to make sure you don't replace [MM/DD/YYYY] by [] at some point
before proceeding to the final page.
Good luck.
--
"Bateman" <ba********@nos pamiehotmail.co m> a écrit dans le message de
news:Xn******** *************** **********@207. 46.248.16... "Patrice" <no****@nowhere .com> wrote in news:OCegOi5UEH A.2484 @TK2MSFTNGP11.p hx.gbl:
Do you mean that if you try something like : timeselection="[" & Request.form("t imeselection") & "]" on your postback it will be seen as "[]" in the confirmation page ?
It looks like that Request.Form("t imeselection") is empty. Could it be outside of the form tag ? Display Request.Form to see if its part of the posted data...
Patrice
If I do something like Session("timese lection") = "[" & Request.form("t imeselection") & "]" timeselection = Session("timese lection") on the page I declare it it will display [6/21/2004 15:00:00] if I Response.Write (timeselection) however on the next page if I do
timeselection = Session("timese lection") Response.Write (timeselection) it will dispaly [] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul |
last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and
session.use_trans_sid = 1 in my php.ini file. Index.php contains:
----------------------------------------------------------------------------
<?php
ini_set("session.use_cookies", "off");
ini_set("session.use_trans_sid", "on");
session_start();
$_SESSION = "";
$_SESSION = "";
echo "<form method='POST' action='login.php'>
|
by: renster |
last post by:
I was wondering if someone could help me with a problem that I'm having
in retrieving session variables on a site I am working on for a friend.
I have made the site more developer friendly by passing the filename for
the page body through the URL, e.g www.mysite.com?page=body1.php. This
works well allowing simply writing the code for the body without having
to change the page header, footer and sidebar. For example, the index.php
looks...
|
by: Peter Redding |
last post by:
Forgive me if this doesn't make too much sense but I've been working on this
project all day and my brain is a bit fried.
To make some of my code more readable I made a file (called urls.inc) which
I include in my PHP scripts. This file contains functions to return a URL
with the session id tagged on the end. I've now found out that the session
id returned by the functions in urls.inc is not necessarily the current, and
more...
|
by: Fran García |
last post by:
I´ve a big problem with the session variables. I load audio files into
media player using as src a php script that check some session
variables and then load the audio file, something like that
<mediaplayer src="displayfile.php?filename=myaudiofile.mp3">
but in the script displayfile.php, I cannot access to the session
variables. Is there a way to see the session variables in the example
above?
|
by: Buck Rogers |
last post by:
Hi guys!
Does anyone have a link to a site that provides up to date
programming book reviews?
I looked through the reviews at:
http://www.accu.org/bookreviews/public/index.htm
Unfortunately, the books reviewed were published
| |
by: genc_ymeri |
last post by:
Hi,
Well, I'm looking around for another opinion. We have two webservers, the
legacy one writen in ASP and the new one in ASP.Net.
Once a user logs in the ASP.Net web app, the session of the Login page gets
stored in a DB (in a binary format). Meantime, if the user chooses to go and
run the web legacy system, he doesn't want to log in again, so an "option"
we are considering is to go and get the data from session of Login Page (of...
|
by: melissa.nava |
last post by:
Here is my code:
*****
Public Property DOB() As Date
Get
Try
DOB = (msBirthMonth + "/" + msBirthDay + "/" +
msBirthYear)
|
by: mike.biang |
last post by:
I have an ASP page that is using an XMLHTTP object to request various
pages from my server. I keep a single session throughout the XMLHTTP
requests by bassing the ASPSESSIONID cookie through the XMLHTTP object.
However, when the page requested through the XML object makes a
<%Response.Redirect()%>
call, a new session is created each time.
Is this a flaw in the XMLHTTP Object? How can I force the session to
remain the same after a...
|
by: Samir Chouaieb |
last post by:
Hello,
I am trying to find a solution to a login mechanism for different
domains on different servers with PHP5.
I have one main domain with the user data and several other domains that
need a login to show data.
I want the user to login only once when he visits any of my domains.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |