close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

no redirect to login AND login info on results page

Thread began 11/28/2009 1:18 pm by webdesignerwags | Last modified 11/30/2009 3:04 pm by Jason Byrnes | 1070 views | 5 replies |

webdesignerwags

no redirect to login AND login info on results page

2 questions in one here -
Insert and Results pages should be restricted unless user is logged in. I need to redirect them if they are not logged in. Had it working at one point so I know it can be done. Just messed it up somewhere along the line and I've gone through these wizards so darn many times, I don't know what I'm doing anymore. Maybe I missed something but I didn't find instructions on setting up Access Rules. I was just sort of winging it. I even went thru the wizard one more time before sending this and I still don't have it.

2nd thing - I want the username (preferably) or loginID to show on Results page. Those fields are in my Login table and not the Orders table which is displayed in Results page. I used the binding for LoginID (only one I had to choose from) in the page but it changes every record in the Results page. In other words, if loginID is 29, it looks like every record was inserted by user 29. If I login as user 34, every record was inserted by user 34. Obviously it is not pulling that info from database. So I'm doing this wrong. I don't want the bindings? What do I want? Can I do this or do I have to join these 2 tables somehow first? As you can tell, I know just enough to be dangerous here but not enough to do this totally on my own. Thanks so much for the help!

Attached is the whole site.

Thank you again,
Laura

Attached Files
Arrow-Shell.zip
Sign in to reply to this post

Office Guy-172461

See if these help:

Defining User Level Access (Interactive Tutorial)

Displaying a logged in users name on backend homepage
196/

Sign in to reply to this post

webdesignerwags

Do I need a user level access table to do all this? I don't have one right now.

thank you

Sign in to reply to this post

Office Guy-172461

I think that would be easiest. I always build for the future. Once you have the logic down, it's always easier to add to a table than to re-write code.

Update: I'm not sure exactly what you're referring to here. As I remember the tutorial uses session variables if that's what you mean.

Sign in to reply to this post

webdesignerwags

The tutorial has you setup the session = to a number (3, 2, 1). What I was looking for in the lightening bolt were the fields in my tables but I couldn't find that. I had been in the right place even before I wrote here, I just wasn't finding what I was looking for.

So is there no way to set the session (login or username) = the login or username from my table? I'd like to use username but could go with loginID if I have to.

That would solve my problems with returning that in the Results table as well. I tried to SELECT username FROM Login and then echo username in the output. But that didn't work either. Not getting an error message so my syntax is ok, but I get blank.

I know I did something like this years ago in ASP. It's just been so long and it's not like that code would help me with this anyway.

Any other thoughts would be greatly appreciated.

Thank you.
L

Sign in to reply to this post

Jason ByrnesWebAssist

1) You have changed the LoginRequired rule incorrectly.

It should be configured as :
Allow If
Value: <?php echo $_SESSION['loginID']; ?>
Critatia: <>
Compare To: <Blank> - leave the compare to field blank, no value.


2) To display the logged in users user name, you will need to modify the login page.

Double click the Security Assist Authenticate user server behavior. O nthe third page of the server behavior wizard, you can select database columns to store in session variables. Select the user name session variable.

To display it on a page, drag the session variable binding to the page.


If you display this variable on the results page, it will look like all orders belong to that user until you filter the results on the logged in user.


See the eCart "How to create an Order History page" tutorial on the How To Section of the eCart support page:
ecart/

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...