View Full Version : Login page with DWCS6 and other "user" things

08-02-2014, 01:02 PM
Hello everyone, sorry if i'm posting in the wrong section... and sorry if my questions are stupid, but i'm sort of new about PHP/mysql, i've just learnt how to use databases and so.

I've checked on google and i couldn't find an answer. I checked on the forum here and i couldn't find what i needed... i start thinking that i can't do it ;P What am i talking about? This:

I'd like to create a Homepage with the usual "Log in" box. And no problems here. Now, after a user logs in, instead of the Log in box i want another box, with "Welcome, UserName!" without the fields of the log in box. To explain better:

Before --> box with " Username field, Password field, Log in button | Register button | Forgot your password?"

After the log in --> box with "Welcome username! | Your control panel | Log out button"

1) How can i change that box to show something before and something else after? I have to redirect the user to an equal page but with a different box?
2) How can i keep the name of the user in the other pages too? something like "xxx.php?IDuser=<etc etc>" in the links with the recordset of the pages on the IDUser filter (when IDUser is = to the parameter from the URL)?
3) And about the control panel, i have to use IDUser to enter that user data (to check, modify, change, etc)?

Thanks all for the attention. :wink:

08-03-2014, 07:43 PM
What are you building? whats the end result?

You would just get the user name etc from the database.

If you are creating this to learn or because you are creating a bespoke system then fair enough. Otherwise depending on what you are wanting to achieve you could use a CMS.

A CMS such as WordPress can do all of this without writing a line of code and it will be better than what you can create. Things like creating a control panel is pretty advanced stuff.

Don't get me wrong there are times when you need to roll your own stuff but there's also no point in reinventing the wheel.

Just depends on what you are after.

If you are serious about learning PHP I'd recommend a PHP dedicated forum such as PHP freaks.


08-04-2014, 09:47 AM
Hi Ricky55, thanks for answering.

I need the site for a project, i have to create a sort of "company website" without using CMS, i have to create it with Dreamweaver. I manage to do about everything but the login box is something that DW doesn't let me do how i want.
I have to put a PHP code that wraps the form part and another that wraps the second part, the "Welcome, username!" once the user log in (all in a if..else).

DW gives me errors and so if i modify the code of the "User log in". The wrapping part works, but the condition "$logged_in="Success" (or loggedin=true, or whatever) doesn't work.

Still researching and practicing, let's see if i manage to do something. Sigh :-(

08-04-2014, 01:45 PM
Why can't you use a CMS? you can still use Dreamweaver to edit the site. Is it for educational purposes?

Dreamweaver is just a tool not the final product.

Just can't see the point in creating work for yourself when you can use free software like WordPress and get far better results quicker.

Dreamweaver is terrible with dynamic content anyway. Trying to do things like this using a GUI is just long winded IMO.

Anyway good luck!

08-04-2014, 01:54 PM
Why can't you use a CMS? you can still use Dreamweaver to edit the site. Is it for educational purposes?

Yes, educational purposes. I need to learn how to do that and explain it to other people and all has to be done in DW. But it seems that i managed to do it, finally! Phew... :-)

I know you get better/faster results with WordPress and those but sadly i needed to do it in DW.