In what way do you want to compare them?  to see if they are the same
string? the same type of var?  different?  greater than?  less than?

My guess is that you want them to be the same (as in the case of two
passwords), in which case it's simple:

<?

if($_POST['pass1'] == $_POST['pass2'])
    {
    $passwords_match = 1;
    }

?>

Of course if you looked in the manual for comparison operators, or even did
a search for comparison, you would have found this quite easy.


If I haven't guessed your question correctly, please provide more
information.

maybe something like levenshtein() is what you want.  Of course, reading
through the string based functions in the manual would also help :)


Justin French



on 08/07/02 1:45 PM, Jas ([EMAIL PROTECTED]) wrote:

> What is the best function or operator to compare two text strings being
> inputted by a text field within a form?  Any help is appreciated.
> Thanks in advance,
> Jas
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to