Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,205,003 members, 7,990,772 topics. Date: Friday, 01 November 2024 at 12:32 AM

Registration/login Page With Php - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Registration/login Page With Php (2228 Views)

Please Help On My Login Page / Creating A User Login Page Where.. (2) (3) (4)

(1) (Reply) (Go Down)

Registration/login Page With Php by leastpay(m): 7:46am On Apr 22, 2012
Pls help me with encrypting a registration and login page with php.
Re: Registration/login Page With Php by chidi500(m): 9:39am On Apr 22, 2012
visit projectdesigner.net
Re: Registration/login Page With Php by 8figure(m): 10:26pm On Apr 22, 2012
chidi500: visit projectdesigner.net


If I tell you that you suck, people will say am being rude, but you need to know how to solve the guy's prob while marketing yourself.

Just an advice, cos if I were the guy, I would be glad to even recommend your site to friends if you solved my problem one way or the other while advertising,else you can imagine the otherwise.
Gracias.
Re: Registration/login Page With Php by GideonG(m): 3:09pm On Apr 23, 2012
Use this code below to learn how to validate your user's registration form.
And dont forget to be more creative cos it's my little creativity that brought this out....
Add your synthetic imagination and creative imagination as a programmer and bring something out to your taste
I hope the snippet helps....


<?php

if (isset($_POST['fname'], $_POST['lname'],$_POST['email'], $_POST['cemail'],$_POST['pword'])){

$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$cemail=$_POST['cemail'];
$pword=$_POST['pword'];

$errors= array();
//Validation Of First Name
if (empty($fname)){
$errors[]="Please Enter Your First Name!<br/>";
}
if (preg_match("/^<>@#%&*()$:;/",$fname)){
$errors[]="Enter A Valid Name!<br/>";

}

//Validation of Last Name
if(empty($lname)){
$errrors[]="Please Enter Your Last Name<br/>";
}
if (strlen($lname)<=3){
$errors[]="Your Last Name is Not Correct!<br/>";

}
//Emails Validation
if(empty($email)){
$errors[]="Enter Your Email<br/>";
}
if(filter_var($email,FILTER_VALIDATE_EMAIL)===FALSE){
$errors[]="You Entered An Invalid Email! Try it again...<br/>";

}
if($email !== $cemail){
$errors[]="Emails do not match!<br/>";
}

if(empty($pword)){
$errors[]="Password must not be empty!";
}



}
if(!empty($errors)){
foreach($errors as $error){
echo"<strong>$error<strong/>";
}
}
if(isset($_POST['submit']) && empty($error)) {
echo"Congratulations!!!! You've been registered...<br/>";
}

?>
<p>
<form action="val1.php" method="post">
First Name:<br><input type="text" name="fname"><br/>
Last Name:<br><input type="text" name="lname"><br/>
Email:<br><input type="text" name="email"><br/>
Confirm Email:<br><input type="text" name="cemail"><br/>
Password:<br><input type="password" name="pword"><br/>
<input type="submit" name="submit" value="Register">
</form><p/>

2 Likes

Re: Registration/login Page With Php by freegistcom: 5:05pm On Apr 26, 2012
This is wonderful. I can't belive a nigerian can offer something free like this. My guy u are wonderful.
Re: Registration/login Page With Php by GideonG(m): 1:05pm On Apr 27, 2012
This is wonderful. I can't belive a nigerian can offer something free like this. My guy u are wonderful.
Thanks for that dude, you are too much too...
Re: Registration/login Page With Php by freegistcom: 12:52pm On May 04, 2012
thanks
Re: Registration/login Page With Php by Ekiti1: 7:34pm On May 06, 2012
GideonG: Use this code below to learn how to validate your user's registration form.
And dont forget to be more creative cos it's my little creativity that brought this out....
Add your synthetic imagination and creative imagination as a programmer and bring something out to your taste
I hope the snippet helps....


<?php

if (isset($_POST['fname'], $_POST['lname'],$_POST['email'], $_POST['cemail'],$_POST['pword'])){

$fname=$_POST['fname'];
$lname=$_POST['lname'];
$email=$_POST['email'];
$cemail=$_POST['cemail'];
$pword=$_POST['pword'];

$errors= array();
//Validation Of First Name
if (empty($fname)){
$errors[]="Please Enter Your First Name!<br/>";
}
if (preg_match("/^<>@#%&*()$:;/",$fname)){
$errors[]="Enter A Valid Name!<br/>";

}

//Validation of Last Name
if(empty($lname)){
$errrors[]="Please Enter Your Last Name<br/>";
}
if (strlen($lname)<=3){
$errors[]="Your Last Name is Not Correct!<br/>";

}
//Emails Validation
if(empty($email)){
$errors[]="Enter Your Email<br/>";
}
if(filter_var($email,FILTER_VALIDATE_EMAIL)===FALSE){
$errors[]="You Entered An Invalid Email! Try it again...<br/>";

}
if($email !== $cemail){
$errors[]="Emails do not match!<br/>";
}

if(empty($pword)){
$errors[]="Password must not be empty!";
}



}
if(!empty($errors)){
foreach($errors as $error){
echo"<strong>$error<strong/>";
}
}
if(isset($_POST['submit']) && empty($error)) {
echo"Congratulations!!!! You've been registered...<br/>";
}

?>
<p>
<form action="val1.php" method="post">
First Name:<br><input type="text" name="fname"><br/>
Last Name:<br><input type="text" name="lname"><br/>
Email:<br><input type="text" name="email"><br/>
Confirm Email:<br><input type="text" name="cemail"><br/>
Password:<br><input type="password" name="pword"><br/>
<input type="submit" name="submit" value="Register">
</form><p/>
Good job bro.
Re: Registration/login Page With Php by okeyxyz(m): 5:32am On May 07, 2012
@GideonG, he asked for encryption, not validation.

nice validation process btw!
Re: Registration/login Page With Php by okeyxyz(m): 5:37am On May 07, 2012
@leastpay, check youtube, there are great php videos that'll teach you php encryption.

(1) (Reply)

We Build; Customized LED Signs | Electronics Sign Boards| Digital Signage / Meet The 19-year-old Who Built A New Search Engine To Rival Google And Youtube / Python Turtle Tutorial- Do Amazing Things In Python Now.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 24
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.