Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!isset($_COOKIE['logged']))
- {
- $sql_user="root";
- $sql_pass="";
- $sql_host="127.0.0.1";
- $sql_database="sync";
- $sql_user_table="users";
- $e_username=$_POST['username'];
- $e_password=$_POST['password'];
- $l_result = mysql_query("SELECT $e_username FROM $sql_user_table WHERE username='$e_username'");
- while($l_result_login_info = mysql_fetch_array($l_result))
- {
- //$c_username = $l_result_login_info['username'];
- //$c_password = $l_result_login_info['password'];
- echo($l_result_login_info['username']);
- }
- $sql = mysql_connect($sql_host, $sql_user, $sql_pass) or die("Couldn't connect!");
- mysql_select_db($sql_database, $sql) or die("Couldn't select database!");
- mysql_close($sql) or die("Couldn't close connection!");
- }else{
- echo("Already logged!");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement