hi bin getting this undefined variable notice and i was just wondering what it meant, because everything is working the way i want it to but getting this notice at the bottom is getting a bit stupid
( ! ) Notice: Undefined variable: errors in C:\wamp\www\AddLeads\addeadstemplate.php on line 99Call Stack#TimeMemoryFunctionLocation10.0000158288{main}( )..\addeadstemplate.php:0
this is the section its in
<?php
if (count($errors)==0)
{
$con = mysqli_connect("localhost","root","","nib");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql="INSERT INTO tbl_club_contacts (CompanyName, FirstName, Address1, Address2, Area, City) VALUES ('$_POST[companyname]','$_POST[firstname]','$_POST[address1]','$_POST[address2]','$_POST[area]','$_POST[city]')";
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
echo "record added";
}
mysqli_close($con);
} // end if $errors == 0
?>
</form>
</body>
</html>