Beginner level problem...plz help

hey guys im really new to php and and im trying to learn by mistakes… so i have a php page when im trying to execute it im getting error:
Notice: Undefined variable: acct in C:\xampp\htdocs\banking\register_preview.php on line 8

here is the code

<html>
<head>
</head>
<body bgcolor='#333333'>
<?php

include 'db_connect.php';
$sql = "SELECT * FROM  myacct WHERE acct='$acct'";
$result = mysql_query($sql) or die("SQL select statement failed");

while ($row = mysql_fetch_array($result))  {
         $acct=$row["acct"];
         $card=$row["card"];
         $name=$row["name"];
         $day=$row["day"];
?>
<br><br><br><br><br><br><br><br>

<table width="50%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#000000">
  <tr align="center">
    <td colspan="3"><font color="#00FF00" size="1" face="verdana">Welcome to your Banking System!</font></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="37%" align="right"><font color="#00FF00" size="2" face="arial"><b>Account Number</b></font></td>
    <td width="7%" align="center"><font color="#00FF00" size="2" face="arial">:</font></td>
    <td width="56%"><font color="#00FF00" size="2" face="arial"><b><?php echo"$acct"; ?></b></font></td>
  </tr>
  <tr>
    <td align="right"><font color="#00FF00" size="2" face="arial"><b>Identity Card</b>
      </font></td>
    <td align="center"><font color="#00FF00" size="2" face="arial">:</font><br>
    </td>
    <td><font color="#00FF00" size="2" face="arial"><b><?php echo"$card"; ?></b></font></td>
  </tr>
  <tr>
    <td align="right"><font color="#00FF00" size="2" face="arial"><b>Full Name</b></font></td>
    <td align="center"><font color="#00FF00" size="2" face="arial">:</font><br>
    </td>
    <td><font color="#00FF00" size="2" face="arial"><b><?php echo"$name $pword"; ?></b></font></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td align="center">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr align="center">
    <td colspan="3"> <form action='main.php' method='post'>
        <input type='submit' value='Proceed'>
      </form></td>
  </tr>
</table>
<?php
   }
?>
</body>
</html> 

plz explain what is going on and how to solve such issues… im really at beginner level so instead of laughing over my stupidity plz help…:confused::confused::frowning:

$sql = "SELECT * FROM  myacct WHERE acct='$acct'"; 

You are trying to use $acct without ever declaring/defining it.

My guess is this is supposed to come from a URL query? Or maybe a form submission where the user chooses an account to view?

In which case you would need to add this to your page

$acct = intval($_REQUEST['acct']); //assuming it is a number