wayne0881 Posted December 14, 2012 Share Posted December 14, 2012 Hi Everyone, I have a couple of questions to ask as I am a PhP newbie. Firstly I am working on a website which will have some content inside it which I only want members to view: as far as I am aware I need to write:- i) Registration script ii) Log-in script which will both work with a MySQL database which will store the members login details. (So far so good I think!!!!) is there access to forms that have already been written?? and have I got the procedure above correct for a membership style website... is there anything else I should be aware of ?? basic questions I know but I really am new to this... Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/ Share on other sites More sharing options...
Beeeeney Posted December 14, 2012 Share Posted December 14, 2012 There are access to forms that have already been written, but not on this website. Google it, or go learn some PHP. Not too hard to learn the basics. There are online tutorials everywhere. Some good stuff even on YouTube. Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/#findComment-1399392 Share on other sites More sharing options...
Muddy_Funster Posted December 14, 2012 Share Posted December 14, 2012 There are a lot of login/registration scripts out there, I have a login one on my blog for example, but the problem is that you need to have a login/registration system that fits with your own table structure in the backend, so it's probably better if you make it yourself. It's one of the best places to get started with PHP as it's low volume coding, but still has practical use. One of the main things to be concious about is the security of the site. you will want to keep your members details safe, so keep that in mind. The other thing is to make sure that your back end is well layed out. Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/#findComment-1399394 Share on other sites More sharing options...
Christian F. Posted December 14, 2012 Share Posted December 14, 2012 I strongly recommend that you read this article about secure login systems, it'll help you create a properly secure member registration & login system for your site. Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/#findComment-1399400 Share on other sites More sharing options...
White_Lily Posted December 14, 2012 Share Posted December 14, 2012 Also, you will want to make sure that a user is logged in on the pages you only want members to view. i.e: <?php if(empty($_SESSION["user"])){ // If the is no username session set, redirect the viewer to the login page or whatever page you want. header("Location: login.php"); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/#findComment-1399413 Share on other sites More sharing options...
PFMaBiSmAd Posted December 14, 2012 Share Posted December 14, 2012 @White_Lily, I hope that isn't the code you are using, because it is not secure. Without an exit; statement after the header() redirect, the rest of the code on the page runs while the browser is performing the redirect and a hacker or bot script simply needs to ignore the redirect and he/it can access the page the same as if that code wasn't even present. Quote Link to comment https://forums.phpfreaks.com/topic/271998-php-forms/#findComment-1399452 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.