Friday, 17 February 2017

Login validataion in PHP




<?php
include"connect.php";
$un=$_POST['txtuname'];
$up=$_POST['txtpass'];
//echo "$un</br>$up</br>";


$res=pg_query($con,"select count(*) from Users where uname='$un' and upass='$up'");

$r=pg_fetch_array($res);
if($r[0]==1)
{
session_start();
$_SESSION['unm']=$un;
$_SESSION['ups']=$up;

 echo "<script type='text/javascript'>";
                echo "if(confirm('Login Successfully'))document.location='home.html';else document.location='home.html';";
                echo "</script>";

}
else
{

 echo "<script type='text/javascript'>";
                echo "if(confirm('Username or password doesnot match'))document.location='home.html';else document.location='home.html';";
                echo "</script>";

}


?>

21 comments:

  1. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.php training in chennai

    ReplyDelete
  2. thank u blogger

    ReplyDelete
  3. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here. java training in chennai

    ReplyDelete
  4. Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.

    AWS Training in Chennai

    ReplyDelete
  5. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
    rpa training in chennai

    ReplyDelete
  6. Very wonderful article! I read your post regularly. It is very interesting and very helpful for improve myself. Please posting.....
    PHP Training Center in Bangalore
    PHP Course in Bangalore
    PHP Training in Nolambur
    PHP Training in Vadapalani
    PHP Training in Kandanchavadi

    ReplyDelete
  7. Your blog information are really creative and useful for the readers.I ever read such kind of nice article yet.
    hope you will add more innovative ideas on your post.
    cloud training in chennai
    Cloud Computing Courses in Adyar
    Cloud Computing Courses in Tambaram
    Hadoop Training in Chennai
    Selenium Training in Chennai
    JAVA Training in Chennai

    ReplyDelete
  8. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
    Selenium online training
    Selenium certification training
    Selenium online course
    Selenium training course

    ReplyDelete
  9. Great post i must say and thanks for the information. Education is definitely a sticky subject. However, is still among the leading topics of our time. I appreciate your post and look forward to more.
    Digital Marketing Training Course in Chennai | Digital Marketing Training Course in Anna Nagar | Digital Marketing Training Course in OMR | Digital Marketing Training Course in Porur | Digital Marketing Training Course in Tambaram | Digital Marketing Training Course in Velachery

    ReplyDelete
  10. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them. keep it up
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete