Jump to content

final hurdle


choobakka

Recommended Posts

i have been working through this tutorial which i have which shows you how to create a complete website/blog/forum using Dreamweaver and ASP. i have it working exactly as i want except for one thing:i have one page which pulls all of the data from an MS Access database table and presents it on the webpage. when i click on the ID number of each row, i am taken to another webpage where i am presented with the records related only to that ID. on this 2nd page i am able to edit the details and submit them back to the database.the third webpage i have is a login page which interacts with the database. however, this login feature will only take me to the first record in the table and allow me to edit it (page 2)what i would like to happen is to completely bypass the first page (with the complete table) and have the user login with their username and password and then they would be directly presented with their related data to edit and resubmit to the database.how can i do this?

Link to comment
Share on other sites

Ok from what I can gather is that you want the user to login and the first page they are presented with their profile??If so...You need to create a recordset which gets the information from the session (assuming you have set up a user session in your login script)Heres what your SQL for retrieving the info should look like:

sql="SELECT * FROM users WHERE username='"&Session("user")&"'"

That will select the records for the user. You may have your session and table name and so on different so adjust this SQL accordingly.

Link to comment
Share on other sites

do you know how i would do this in dreamweaver?my login form is called frmLogin with fields 'username' and 'password' if that helps. in dreamweaver a session has been created called 'MM_Username'. there are other sessions but im assuming this is the one i need to work with!any ideas?

Link to comment
Share on other sites

Yes dreamweaver uses the session name 'MM_Username' ...I have decided a week ago to write my own scripts. So far I find it is better because you rmore free to do things.But if your new to ASP stick to DWeaver and their premade scripts :)

Link to comment
Share on other sites

Well Dreamweaver has an inbuilt user system. Which are scripts like the login and 'Check user is logged in' scripts. Also some other little ones aswell.Really tutorials are a really big help when your trying to make a major ASP project when your new. A simple Google search on ASP tutorials will help you.I myself am making a forum and blog in ASP with all my own code and ive built it similar to Invision Pover Board.

Link to comment
Share on other sites

i typed the follwing SQL statement is dreamweaver for a recordset:SELECT * FROM tblCustomer WHERE username = '"&Session("MM_Username")&"'"i get the following error message when i try and test the recordset:Syntax error in string in query 'username = '"&Session("MM_Username")&"'"'any ideas?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...