digital_plunder 0 Newbie Poster

Ok ok bro,i will improve it..thx again.....

digital_plunder 0 Newbie Poster

thanks broj1...my problem has been resolved...thx a lots....

digital_plunder 0 Newbie Poster

That error comes that is not sql error,the error is on 39 line,when someone try to login with wrong username....can smeone help me out.

digital_plunder 0 Newbie Poster

thx for the help bruh....i have improved it little bit...but m getting error...can you please resolve it...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Latest</title>
    </head>
     
    <body>
     
    <?php
    include("db.php");
     
    if(isset($_POST["submit"]))
    {
    $username=$_POST["username"];
    $password=$_POST["password"];
    $query="select * from latest where username='$username' && password='$password'";
    $query1=mysql_query($query);
    if(mysql_num_rows($query1)>0)
     
    {?>
     
    <font color="#FF0000" size="+4"><b>
    <?php
     
    echo "welcome "."$username";
      exit;  
    	}
		else
			{
				$msg="Invalid Username or Password";		
			}
			
	}
     
     ?>
    <table align="center" border="2">
    <form enctype="multipart/form-data" action="login.php" method="post">
    <tr><td> <?php echo($msg);?></td></tr>
    <tr><td>Enter Username</td>
    <td><input type="text" name="username" />
    </td></tr>
    <tr><td>Enter Password</td>
    <td><input type="password" name="password" /></td>
    </tr>
    <tr><td>Submit</td><td><input type="submit" value="submit" name="submit"/></td></tr>
    </form>
  
    </table>
     
    </center>
    </body>
    </html>
digital_plunder 0 Newbie Poster

when i try to access this login page..an empty page open...please help with this coding

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Latest</title>
</head>

<body>

<?php
include("db.php");

if (isset($_POST["submit"]))
{
$username=$_POST["username"];
$password=$_POST["password"];
$query="select * from latest where username='$username' && password='$password'";
$query1=mysql_query($query);
if(mysql_num_rows($query1)>0)

{?>

<font color="#FF0000" size="+4"><b>
<?php  

 echo "welcome";
 echo ($username);

}
else 
{

?>
 

<center>
<table align="center" border="2">
<form enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']  ?>" method="get">
<tr><td></td></tr>
<tr><td>Enter Username</td>
<td><input type="text" name="username" />
</td></tr>
<tr><td>Enter Password</td>
<td><input type="password" name="password" /></td>
</tr>
<tr><td>Submit</td><td><input type="submit" value="submit" name="submit"/></td></tr>
</form>
<?php } } ?>
</table>

</center>
</body>
</html>
digital_plunder 0 Newbie Poster

i m working with sessions..
i have problem with sessions
here is my coding
"
<?php
session_register("admin_id");
if($_SESSION["admin_id"]=="")
{
header("location: login.php");
}

?>
"
i want to register a session

but when i use session_register function i got error ""Deprecated: Function session_register() is deprecated in C:\xampp\htdocs\xampp\c\admin\session_check.php on line 2""

help me..how can i register session without this error...

digital_plunder 0 Newbie Poster

then how can i fetch another feilds from mysql with image...please help..it urgent....i want to fetch image(blob) and another fields on 1 page...how it can possible?...

digital_plunder 0 Newbie Poster

i m trying to fetch a image from mysql (blob) with header..here is my coding..."<?php
include("db.php");

$query=mysql_query("select * from table where id='3' ");
$row=mysql_fetch_array($query);
$r=$row;
header("content-type:image");
echo $r;

?>"

i want to fetch another fields from the database....but when i try to echo another fields...the page shows error or it does not echo other fields of database....please help me...how can i resolve it...i want to fetch other fields from database,like'username'password'firstname'lastname and image...thanks in advance...