I am trying to get this form:
if any $ _POST vars is equal to any other of $ _POST vars, throws an error.
If it was just a few, this is not a problem, but I have about 20 or so therefore, if I wanted to do this, I would have to go like
<?php
if($_POST['input1']==$_POST['input2'] || $_POST['input1']==$_POST['input3']){
die('whatever');
}
?>
But this is not good coding (and it will take forever) I thought about arrays and in different ways ...
but I'm a dead brain, so I thought I could help. thanks in advance
ps it would be nice to do this in PHP (server side), but jQuery is always an option.
source
share