This is my "login" condition and the class "msg"
<?php
$username = $_POST['username'];
$password = $_POST['password'];
if($username&&$password)
{
$query = mysql_query("SELECT * FROM users WHERE username='$username'");
$numrows = mysql_num_rows($query);
if($numrows!=0)
{
while($row = mysql_fetch_assoc($query))
{
$dbusername = $row['username'];
$dbpassword = $row['password'];
}
if($username==$dbusername && md5($password)==$dbpassword)
{
$_SESSION['username']=$username;
echo "<table class='msg'>";
echo"<tr>";
echo"<td>";
die ("You are loged in!
<a href='admin_panel.php'>click here</a> to enter the <b>Admin Panel<b>.");
echo "</td>";
echo "</tr>";
echo "</table>";
}
else
{
$wrongpass = "Incorrect password!";
}
}
else
{
$exist = "That user doesn't exist!";
}
}
?>
.msg
{
margin:0 auto;
margin-top:200px;
font:16px;
}
Actually I want to show the die()
alert in the middle of the web page with padding 200px. Using margin:0 auto
properties I can't do it. Is there any other way to having it? How can I do it then.