Copy link to clipboard
Copied
This is what I am trying to create: a "members only" area of a Web site where the members can log in, view their contact information from our membership database, and update it if need be. Of course they can't be able to see anyone else's information.They are logging in using their email address and an assigned (dummy) password, which they will have to change when their profile pops up.
This is what I have: a login page that redirects to an update_user.php page upon successful login. The redirect is working, but the page is not automatically populated with the member's information. I put a hidden field on the login page that has a value of user_id (the primary key in my database), pulled from a recordset of getUser--hoping that this would get passed to the update_user.php page. This is the way my Delete User page works. But it isn't working in this case - the update user page still opens up blank. If anyone could help with this vexing problem I would greatly appreciate it.
Gail
>but the page is not automatically populated with the member'sinformation
If you are using PHP/MySQL then all you need to do is:
So it should look in the recordset menu sort of
...Copy link to clipboard
Copied
>but the page is not automatically populated with the member'sinformation
If you are using PHP/MySQL then all you need to do is:
So it should look in the recordset menu sort of like this:
Name: | ||
Connections: | ||
Table: | ||
Columns: |
| |
Filter: | ||
Sort: |
And there you go. A "Profile Page" is created.
For the "Update Page" follow the same steps as above but eliminate the "Bindings Panel" step. Instead use the "Update Record Wizard" to make the profile update page.
(Remember to create the recordset the same as I described above. This is mandatory to for restricted pages to be user profile related)
Explanation of the above process is that when you create a login page with the DreamWeaver function "Log In User", DreamWeaver creates in the code view this:
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
Copy link to clipboard
Copied
I have one more question. Is there any way to create more $_SESSION variables, than only those given by Dreamweaver? For example $_SESSION["user_id"] or something like that?
Copy link to clipboard
Copied
You can create as many session variables as you need.
Copy link to clipboard
Copied
I imagine, but how to do that?
Copy link to clipboard
Copied
//I imagine, but how to do that?
patriciofuert alread showed you - look at the bottom of their post where it shows how to declare and assign session variables. Before going any further you should really learn the basics of the scripting language you are working with. Trying to jump into the middle without knowing the basics is going to be frustrating.
Copy link to clipboard
Copied
Thank you; I will now try it.
Actually I have been working with PHP before but without Dreamweaver so everything was slightly different...
Copy link to clipboard
Copied
Patricio,
I am posting to express my utmost gratitude for your very detailed response. This not only was the correct answer, but it allowed me to complete my entire member login/logout and update process without any additional frustration. I have posted on this (and many other) forums, trying to find a solution, since I am very new to building dynamic web sites. All I have received is one-line answers of "just do this," but for a newbie like me, I needed the step-by-step that you provided. Thank you again for taking the time to walk me through this. I know others will benefit as I have.
Gail