Jump to content

members script


reggie
 Share

Recommended Posts

I have found a number of member / login scripts that use a post self method.For some reason they dont work. Doest anyone know of a free download that works, or could anyone help.I want a script that validates the registration and gives error messages within one file. The one i have that works t the moment loads a seperate .php file to validate and send error messages, but the error is on a blank screen. Also i would like to include a session or cookie to store username while logged in.Somehow included on each page a script that checks to see if each member is logged in or not.Something like thisFunction ValidateEntry{if error......else{include('welcomemember');session('user',$username);}<form>bla bla bla</form>------------------And on each other members pageIf session user != {error}Can anyone help...........

Link to comment
Share on other sites

The key to getting it all on one page is have the form submit to itself and use a hidden input to tell the code what to do.<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"><input type="hidden" name="mode" value="submit">And then you can check that hidden variable and take whatever action you need to with the form information.

<?php if ($_POST['mode'] == "submit") // the form was submitted

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
 Share

×
×
  • Create New...