Mon Feb 13, 2017 6:54 am
<?php
session_start();
include("connection.php");
$_SESSION['user'] = $_POST['uname'];
$_SESSION['uname'] = $_POST['uname'];
$_SESSION['pass'] = $_POST['pass'];
?>
<html>
<body>
<form method="POST">
username:<input type="text" name="uname" id="uname"></br>
password:<input type="password" name="pass" id="pass"></br>
<input type="submit" name="submit" id="submit">
</form>
<?php
if(isset($_POST['submit'])){
$name= $_SESSION['uname'];
$pass= $_SESSION['pass'];
$sql = mysql_query("SELECT * FROM `users` WHERE username ='$name' or password = '$pass'");
if($r = mysql_fetch_row($sql)){
header("Location:welcome.php");
}
else{
echo "bye";
}
}
?>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.