Tuesday, February 18, 2014

Create A First Login or Sign Up Form Using PHP without Database

This Is signin.html page
<html>
<form>
<label>Name
<input type="text" name="username">

<label>
<br>
<label> Password
<input type="password" name="password">

</label>
<br>
<input type="submit" name="submit">
<input type="reset" name="submit">
</form>
</html>

This Is Your Data Processing Page signin
.php


<?php

if(isset($_GET['submit'])){

$name=$_GET['name']; /*$_GET[user'name'] retrieve data From signin.html <input> field containing name=username;*/

$pwd=$_GET['password']; /*$_GET['password'] retrieve data From signin.html <input> field containing name=password;*/

if($name=="abcd" && $pwd=="123456")
{/* if user enter username abcd or password 123456 then user login else prompt wrong user*/

echo('welcome Home ');
}
else{
echo('wrong username or password enter');
}
}

else{
}


?>