
- Unnamed
- Friday, February 22nd, 2008 at 12:10:46pm MST
- This URL: http://pastebin.ca/914248
- Alternatives: Raw
- Language: Raw
- Age: 19 hrs 59 mins
- <?php
- $host="localhost";
- $username="pandemic_njit";
- $password="njit";
- $db_name="pandemic_njit";
- $tbl_name="njit";
- mysql_connect("$host", "$username", "$password")or die("cannot connect");
- mysql_select_db("$db_name")or die("cannot select DB");
- $username=$_POST['username'];
- $password=$_POST['password'];
- $sql="SELECT * FROM $tbl_name WHERE username='$username' and password='$password'";
- $result=mysql_query($sql);
- $count=mysql_num_rows($result);
- if($count==1){
- session_register("username");
- session_register("password");
- header("location:login_success.php");
- }
- else {
- echo "Wrong Username or Password";
- }
- ?>
Total Paste Views: 1 — Trackback (0) — PermaLink — Remove Paste


Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords.


Stuff to Do