Hi i'm totally beginner with php. So I'm trying this one for my school project. And I'm seeing
Undefined index: n1 in C:\xampp\htdocs\assignment.php on line 49
Really don't know where the problem is.
<html>
<body style="color:Midnightblue;"bgcolor=#eee8aa>
<form action="index.php" method="post">
<h1>Mobile Shop Management</h1>
<font size='16'><i>Type your Name:</i></font> <input type="text" name="n1" size="10" style="background-color: lightblue;    
    display: inline-block; 
    margin-right: 20px; 
    width: 380px;
    height: 50px;
    border-radius: 0%;
    margin-left: 72px;  
    text-align: center;
    font-size: 2em;"><br><br>
<font size='16'><i>Type your Budget:</i></font> <input type="text" name="n2" size="10" style="background-color:lightblue;   
    display: inline-block; 
    margin-right: 20px; 
    width: 180px;
    height: 50px;
    border-radius: 0%;
    margin-left: 50px;  
    text-align: center;
    font-size: 2em;"><br><br>
<input type="submit" size="10" value="Show" style="background-color:lightblue;
    box-shadow: 5px 5px 5px #888;   
    display: inline-block; 
    margin-right: 20px; 
    width: 280px;
    height: 50px;
    border-radius: 0%;
    margin-left: 230px; 
    color: #CC0000;
    text-align: center;
    font-weight: bold;
    font-size: 2em;
    border: 4px solid #008800;">
</form>
</body>
</html>
<?php
if ($_POST['n1']<>""||$_POST['n2']<>"")
{
    $x=$_POST['n1'];
    $y=$_POST['n2'];
$c=mysql_connect("localhost","root",""); 
mysql_select_db('mis410');
$q=mysql_query("select Mobile_brand from mobile_shop where price<=$y"); 
echo "Hello mr./ms. $x <br> Available devices: $q";
mysql_close($c);
}
?> 
 
     
    