This question already has an answer here:
<?php
$filename = 'install.php';
if (file_exists($filename)) {
echo ("<center><font color='red'><b>/install.php still exists<br>
After installing please delete install.php</center></font></b>");
} else {
if (isset($_POST['Login'])){
include('config.php');
if (!mysql_connect($host, $username, $password)) die("Can't connect to database");
if (!mysql_select_db($db_name)) die("Can't select database");
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword' or die(mysql_error());";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count >= 1){
session_register("myusername");
session_register("mypassword");
header("location: index.php");
} else {
}
}
?>
I have tried to fix it but not sucsessfuly. I don't know how i can fix it because i am a php noob.
</div>