Please I have two tables (keygen and sub2) in a database nassk. I created a form with the table sub2 keygen fields are keygenID, Keygen while sub2 fields are SubID, Keygen, userID, Date_Sub
i was to correct my code on my form Sub2 with fields like $ID, $KeyGen, $userID, to be able to to check the database and if the form field $Keygey is == to the table keygen field Keygen, then the form should submit else it should raise error.
below are code i have use
global $subscription;
$db = new clsDBConnection1();
$SQL = "SELECT KeyGen FROM keygen";
$Result = mysqli_query($SQL);
if(mysqli_num_rows($Result) > 0)
if (($Result) !== $subscription->KeyGen->GetValue())
{
$subscription->Errors->addError("The values of Password and Confirm fields do not match.");
}
}
}