how to create sign-up form?

GZ47Q

New Member
Messages
33
Reaction score
0
Points
0
How can I create a sign-up and login form for my website? And what are the other things that I need to do so that visitors can sign-up and login. I also need to know how to make some pages available only to viewers that are signed-up and logged-in and how to make these pages viewable by x10 for checking.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
The easiest way would be to use a pre-built login system like vAuthenticate, or vSignup. You just upload one of these systems and configure it. Then you have a fully working login/members only system.
 

GZ47Q

New Member
Messages
33
Reaction score
0
Points
0
What do I need to do so that x10 can check the pages that are only for members?
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
You would need to create an account for the x10staff to use, even if the account only has read only access, it is best to send the account details via private message to a staff member probably best to send it to Chris73 or one of the other admins.
 

GZ47Q

New Member
Messages
33
Reaction score
0
Points
0
How do I install these scripts on my website and can I make some pages available only to members that are logged-in?
 

phpasks

New Member
Messages
145
Reaction score
0
Points
0
How do I install these scripts on my website and can I make some pages available only to members that are logged-in?

You can use session variable for

After login set session if session available then see those pages

ob_start();
session_start();

if (!isset($_SESSION['int_userid'])) {
tep_redirect("index.php");
}
 

GZ47Q

New Member
Messages
33
Reaction score
0
Points
0
Where will I put the code that you gave me? And, if they are not logged-in, how will I show a error page?
 
Last edited:

oscetips

New Member
Messages
26
Reaction score
0
Points
0
it's not tooo difficult to build signup and login pages, but it's more of a challenge with error catching and feedback.

all pages must start with session_start();

/register.php -> create your form and post it to itself. this page should include code to add the user details to a mysql database.

/login.php -> again, create the form and post login fields to itself. must include code to query the database to check if user exists and password is correct. if successful, create set the session variable (eg. $_SESSION['loggedin']=1; )

if you want to secure your pages from unautheticated users, include this on your pages to redirect them to login page.

session_start();
if(!$_SESSION['loggedin']){
header("location: login.php");
}

also check out w3schools for php tutorials.
 
Last edited:

phpasks

New Member
Messages
145
Reaction score
0
Points
0
it's not tooo difficult to build signup and login pages, but it's more of a challenge with error catching and feedback.

all pages must start with session_start();

/register.php -> create your form and post it to itself. this page should include code to add the user details to a mysql database.

/login.php -> again, create the form and post login fields to itself. must include code to query the database to check if user exists and password is correct. if successful, create set the session variable (eg. $_SESSION['loggedin']=1; )

if you want to secure your pages from unautheticated users, include this on your pages to redirect them to login page.

session_start();
if(!$_SESSION['loggedin']){
header("location: login.php");
}

also check out w3schools for php tutorials.

You can download login & registration form --> Source Code here

http://www.phpasks.com/ajax/ajax-login.html
http://www.phpasks.com/ajax/submit_form_ajax.html

now what issue tell me????
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Rather PM the x10staff account details to a Account Manager( Pink titles like mine :( ). As we are the people that review accounts. If you send it to me I will add it to the list, but please don't PM staff unless asked to do so.
 

GZ47Q

New Member
Messages
33
Reaction score
0
Points
0
Where do I need to upload the the vsignup and vauthenicate files? And how do you execute files (the createdb.sql file) with phpmyadmin?
 
Top