I think you might have a syntax error. if you have to check something, then the if statement should be: if($submit == true) if($submit = true) -> is setting submit to true not checking. Hope this helps.
Necron8
Posts
-
I want to clear something about PHP and HTML (newbie) -
HTML Login Controls help!Yes I get the idea, so I make my custom controls using textboxes/labels/buttons etc to connect to my database. So that's problem solved. Second prob which is of administration. so I add a field to the client table as IsLoggedIn (as bool - Yes/No) and make a session. Now do I have to create the session in the master page? And how should i create it? Also another idea is: For the administration page, while the user logs in, I check for the username and password the client has together with his permission. If the username and password match, the user is logged in as a normal registered user (if permission is User). If the username and password entered are in the database and his permission is Admin, he is redirected to the Admin page. Is that a secure solution or? If you could send me some sample small login with the session please do so. I'm not requesting the whole code, just a sample so as to help me make this type of feature in my website. Thanks! I thank you for the help and for administrators, sorry that I've made my question too long. Thanks!
-
HTML Login Controls help!Hello there people I'm working on an ASP.NET website using C# code on VS 2005. My problem is that when using the Login controls like the Registration Form, Login Control, Login Status, Change Password, etc, I don't want the project to create a .mdf file. So, I made a connection string in the web.config file to use my SQL Server 2005 database. The problem is how could I make this kind of registration type of site? I've tried searching tutorials but with no success. I want the site to be able to handle registrations and logins using my SQL Server 2005 database Website type is: Shopping Cart. Problems I'm encountering: 1. I need to know how to use login controls using an SQL Database which is not created automatically. 2. I need to know hot to tackle permissions, like I have the main site to be available to non-registered users and registered users but I don't want anyone to access the Administration site. File Structure: Folder -> Administration Admin.aspx UserList.aspx Folder -> App_Code (to store the code of the cart/other functions Code.aspx Folder -> App_Data (not used because I want to use an external Database) Folder -> App_Themes (to store stylesheets) Folder -> Images to store all the images Folder -> Catalog (contains the products cathegories) Folder -> Login Login.aspx Register.aspx ChangePW.aspx RecoverPW.aspx RecoverPWConfirmation.aspx Default.aspx MasterPage.master Admin.master I'm Using two master pages, one for the whole site, and one for the administration. I want to use the main login with a hard coded admin privileged user in the database to access the administration and no-one else. My DB has a table named user Permission where it has the PermissionID(PK)(1, 2), PermissionType(User/Admin) and have a table named Clients with the Client ID(PK), Name, Surname, PermissionID(FK) So far this is the code I used for the Web.Config File