I developed a few pages to restrict access by way of a username and password login. I keep getting an error that says my session variable "login" is undefined. here is the code in question, though it might be more so on another page.
I'm no expert but I think you may just need to cfparam SESSION.login with a default value of "no" <cfparam name="SESSION.login" default="no"> in your Application.cfm. I've personally found no problem using session vars and cflocation in this way, the only problem I can think of with cflocation is that you can't append URL vars to the cflocation URL, but you can append session vars....I could be wrong though ;-)
Well I think I figured out after the posts you, arrgh, and Shalinko posted. I didnt have a <cfset SESSION.login = "No"> on my adminLogin.cfm template. Not sure yet if its working correctly though, as now I have a new error saying the admin table doesnt exist...and I'm looking at it right now! lol
Ok well it DOESNT exist. I created the new rlbAdmin table in Navicat and it shows up fine, but when I look at my databases in DW its not there. Im still confused. I thought when I added things to mysql databases with navicat, it would, when refreshed, show up locally in DW.
Well I think I figured out after the posts you, arrgh, and Shalinko posted. I didnt have a <cfset SESSION.login = "No"> on my adminLogin.cfm template
But you shouldn't have to! That's the whole point of using CFPARAM. It sets a default for a variable only if that variable doesn't exist ;-) As long as your other page is in covered by your Application.cfm, it should work without having to set the variable manually.
lol arrgh I agree. everything works locally now! but remotely I still get an error that says the table doesn't exist! As you know I am using Navicat and I created this new table there. The new table shows in Navicat and I even created a quick page with a query to display the records of the new table and it works. This new query page doesnt work remotely, as I get the same error that the table doesn't exist. Maybe I'm really confused and missing out on the concept of MySQL and Navicat! lol Again, I assumed that if I create a table, add records, delete records, whatever, within navicat, because it has a connection to my remote DB server, then everything should be correct on the remote DB server. Am I just totally not grasping something??
Well you're talking about a totally different error now. It sounds like a db error. I can't see the query code from here ;) But with datasources it could be anything from missing permissions, wrong user account used to connect, to a datasource pointing to the wrong db.
Oh my Lord! lol just off from chatting with hosting tech support. The other week I was having a similar issue, so I remember them saying they would move my database, to another server. I am using some hosting space from a friend's site. Anyway, in Navicat, I never changed the server hostname...which they didnt tell me to nor what the new host name was. Well I just changed it and added the new table in question and it works!..sheesh Thanks again! I hate when I post a question and something like this is the real issue...makes it seem like I posted it for nothing. Thanks arrgh!