<?php include "db/config.php";?>
<?php
function loginCheck($username,$password)
{
$sql=mysql_query("select UserId, UserName, Password from user_login where UserName= '$_POST[username]' and Password= '$_POST[password]'");
$name=$sql['UserName'];
//echo"hi".$name;
//select * from user_login where UserName='mownam' and Password='welcome'
$result =mysql_query($sql);
//$uname=$_REQUEST["username"];
if(mysql_num_rows($result) > 0)
{
echo "<center>successfully logged<br />".$uname;
}
else
{
?><div align="center" style="background-color: #FFFFCC"style="font:"Courier New" , Courier, monospace" style="font:message-box " style="font-size:10px"
id="loginerror"><strong>Invalid Username password</strong></div>
<?php }
}
function insertValues($username,$password) {
$sql=mysql_query("INSERT INTO user_login (UserId, UserName,Password, add_rights, update_rights,view_rights,delete_rights) VALUES ('','$_POST[username]','$_POST[password]','','','','')");
echo "ok";
}
function updateValues($username,$password) {
$sql=mysql_query("update person set dob='$c', password='$b' where username='$username'");
}
function deleteValues($username) {
$sql=mysql_query("delete from person where username='$a'");
}
?>
mownam 0 Newbie Poster
mownam 0 Newbie Poster
sv3tli0 0 Junior Poster in Training
pzuurveen 90 Posting Whiz in Training
ko ko 97 Practically a Master Poster
diafol
stoopkid 6 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.