I have a form to get information and when i type just spaces with no any other character it gets posted, How could i avoid inserting just spaces in the form?
<form action="index.php" method="post">
<textarea name="textA"></textarea>
<input type="submit" name="sent" value="Send">
</form>
<?php
if(isset($_POST['sent']) && !empty($_POST['textA'])){
$insert=new Insert();
$insert->insertData($_POST['textA']);
}
?>