What am I doing now?
Use Dreamweaver's built in features 
Monday, January 28, 2008, 04:07 PM - Scripts, Dreamweaver
Posted by Administrator
Well, I've been very occupied with the constant drum of work, which is a good thing, but that leaves far less time for random coding I've been trying to include here. Well, today I have a cross over from the work to something I hope you'll find useful.

In Dreamweaver, they have an authentication server behavior. It validates the user name and password against columns in a table in your database. I recommend you use email addresses for usernames (people tend to recall those...) - doesn't matter for this snipped of "wisdom". In any case, once they are logged in, the authentication puts the username in the session. The session variable is called "MM_username". This is handy ... why, you ask?

Ok, you've got someone logged in and you'd like to display information about their account to them, use the Dreamweaver server behavior for the recordset that will pull the information about them and filter by a session variable, called MM_username, this will (SHOULD) be a unique column in the database and it will allow you to quickly and easily pull that information about the visitor in the secured area. Likewise, if you have content that is available on a scale (only those members of level 2 can see reports ABC) you can also use the MM_username for that too, simply pull the member database with the MM_username so you have your user and then use the $rowRecordsetName['userlevel'] to filter the reports list (although this will be hand coded, Dreamweaver doesn't YET see the rwo results from other recordsets as valid data). Make sure you do any manual edits, like the above, after you've setup the page the way you want it to be, using the drag and drop ease from the bindings panel to the page. The manual editing will (usually) break the bindings panel and it won't be able to find the recordset anymore...
add comment ( 5 views )   |  0 trackbacks   |  permalink   |   ( 2.9 / 458 )

<<First <Back | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Next> Last>>