I have the following button:
<button type="submit" class="btn btn-info pull-right"><? echo $titulo; ?></button>
This button sends a form action, with the data filled in.
And I also have the following field:
<input type="text" class="form-control" name="con_email" id="con_email" placeholder="E-mail da Consultora" value="<? if(isset($dados->con_email)){ echo $dados->con_email; } ?>" required>
I need to, by pressing the submit button, check if this email already exists in the database. I know it's possible to work this out in jQuery, however, I do not know where to start checking.
I just thought about sending, I search using php and return true or false, returning, true, I just call a modal, returning false, I call ajax to insert into the database, using the get or post method .
Does anyone have any idea how I can craft this jQuery?