Hopefully somebody can help because what's happening makes no sense to me at all. I have an eventswitcher in onsubmit that evaluates if a field is already in the DB or not and it returns fail if it is already in the database and returns success if it's not already in the database. If while testing the form I put in information that will make it succeed I have no problems. However, if I put in information that will make it fail I just get an internal server error, which I suppose is better than it saving to the DB, but I'd rather have it reload and show a tiny error message.
The event switcher titles are Success and Fail and since I've just been trying to get it to work literally all I have is the default eventloop under fail. I think it's really odd that it will work if it's success but error 500 if it's fail. any thoughts?
<?PHP
$mysqli = new mysqli("00.00.00.00", "username", "password", "DB");
$SQL = "SELECT * FROM Kaphene_Teams";
if ($result = $mysqli->query("SELECT * FROM Kaphene_Teams WHERE TeamName = $form->data['TeamName']))
{
return fail;
}
else
{
return success;
}
The event switcher titles are Success and Fail and since I've just been trying to get it to work literally all I have is the default eventloop under fail. I think it's really odd that it will work if it's success but error 500 if it's fail. any thoughts?