Page 1 of 1

comparing mutual exclusive input text value

Posted: Tue Mar 23, 2004 9:10 pm
by crimsonluv
hai. i am new in php programming. i hope anyone can help me or give me a few resources.

here is the problem i faced :

i have 2 variable $a and $b . these are from 2 different text box. i wan to compare these 2 values. one value will be null and the other must not be and vice versa. the non null value will be passed to another variable, $c. and i wan to check again if the $c value is not in database to avoid duplicate record.

thanks !

:?

Posted: Tue Mar 23, 2004 9:11 pm
by Zorth
You can't just do == ? I was actually wondering something like this myself and what if you want it to be case sensitive or not...

Posted: Tue Mar 23, 2004 9:17 pm
by crimsonluv
it's case sensitive. i tried to use javascript like :
<script type = "text/javascript">
function check() {
if (<?php echo $a> !=="" )
var $c == <?php echo $a>
}
</script>

but it's not working. i tried lots of methods but nothing works :(