message in php
message.php
<?php
echo "Welcome ! U have to login for continue.";
echo "<br/>";
echo "<a href='userLogin.php'>Login</a>";
?>
Bangladeshi Forum
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.This theme is Bloggerized by Lasantha - Premiumbloggertemplates.com.
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.This theme is Bloggerized by Lasantha - Premiumbloggertemplates.com.
Replace these every slider sentences with your featured post descriptions.Go to Blogger edit html and find these sentences.Now replace these with your own descriptions.This theme is Bloggerized by Lasantha - Premiumbloggertemplates.com.
11:37 PM
Sabuj Ahmed
<?php
echo "Welcome ! U have to login for continue.";
echo "<br/>";
echo "<a href='userLogin.php'>Login</a>";
?>
11:35 PM
Sabuj Ahmed
<?php
include("connect.php");
//variable define
$userName=$_REQUEST['userName'];
$userEmail=$_REQUEST['userEmail'];
$userPassword1=$_POST['userPassword1'];
$userPassword2=$_POST['userPassword2'];
$password=md5($userPassword1);
// .......................Email validation.................
function isValidEmail($userEmail)
{
$pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*
(\.[a-z]{2,3})$";
if (eregi($pattern, $userEmail))
{
return true;
}
else
{
return false;
}
}
// .......................Error Message.....................
//start error message
$error=false;
$errorMessage="";
if(empty($userName))
{
$error=true;
$userNameError=true;
$errorMessage.="Please provide username.</br>";
}
if(empty($userEmail))
{
$error=true;
$userEmailError=true;
$errorMessage.="Please provide email.</br>";
}
if($userPassword1=="")
{
$error=true;
$userPassword1Error=true;
$errorMessage.="Please provide password.</br>";
}
/*if($userPassword1)
{
if(preg_match("/^.*(?=.{8,})(?=.*[a-z]+)(?=.*[^A-Za-z0-9])
(?=.*[0-9\.\-\@\#\$\&]).*$/",$userPassword1))
{
$successMessage.= "Successfuly checked your password.
U have to login now";
}
{
$error=true;
$paswordValidationError=true;
$errorMessage.= "Please Enter"."<br />"."Atleast 8 character"."
<br/>"."Alpha numeric value"."<br />"."1 Special character";
}
}
*/
if($userPassword1!=$userPassword2)
{
$error=true;
$passwordMatchingError=true;
$errorMessage.="Password does not match.</br>";
}
if(!isValidEmail($userEmail))
{
$error=true;
$emailValidationError=true;
$errorMessage.="Invalid email id.</br>";
}
//end error message
//start insert data
if($error)
{
include("index.php");
}
else
{
$sql="insert into sign_up
(
userName,
userEmail,
password
)
values
(
'$userName',
'$userEmail',
'$password'
)
";
$result=mysql_query($sql);
if($sql)
{
echo "Successfully inserted";
//end insert data
?>
<script language="javascript">
window.location="message.php";
</script>
<?php
}
}
?>
11:23 PM
Sabuj Ahmed
<?php
if(isset($error) && $error==true )
{
?>
<div align="center" style="border:1px solid #F00;
background-color:#FFF2FF; width:300px;;">
<?php
echo $errorMessage;
?>
</div>
<?php
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registration Form</title>
</head>
<body>
<center>
<form name="userRegistration" action="registration_action.php"
method="post">
<table>
<tr>
<div style="text-align:center; font-size:24px;
color: #3366FF;">Registration Form</div>
</tr>
<br/>
<tr>
<td>User Name:</td>
<td><input name="userName" type="text"
value="<?php if(isset($_POST['userName'])) echo $_POST['userName']; ?>"/>*</td>
</tr>
<tr>
<td>Email Address:</td>
<td><input name="userEmail" type="text"
value="<?php if(isset($_POST['userEmail'])) echo $_POST['userEmail']; ?>"/>*</td>
</tr>
<tr>
<td>Password:</td>
<td><input name="userPassword1"
type="password" value=""/>*</td>
</tr>
<tr>
<td>Confirm Password:</td>
<td><input name="userPassword2"
type="password" value=""/>*</td>
</tr>
<tr>
<td align="right"><input name="submit"
type="submit" value="Submit"/></td>
<td><input name="reset" type="reset"
value="Reset"/></td>
</tr>
</table>
</form>
</center>
</body>
</html>
10:35 PM
Sabuj Ahmed
3:24 AM
Sabuj Ahmed
RSS Feed
Twitter