Posted by Jerry Stuckle on 03/06/07 22:09
shror wrote:
> hi,
>
> i am building a small mail form system that i want to make it safe as
> much as i can, so i added a ramdomly generated 4 characters that my
> user have to enter in the corresponding text box so that if he entered
> these characters correct the mail is sent if not the error message
> appear.
>
> what i have:
> 1- i used a randomly generated 4 characters
> 2- text bex for the user to enter the randomly generated variables
> 3- if else statement:
>
> my if...else code
>
> if ($UserEnteredText == $RandomText){
> echo "correct";
> }
> else{
> echo "wrong";
> }
>
>
> my problem:
> always the code echos wrong message, which means that i have a problem
> that i dont know what is it.
>
> so please help me
> I really need your help ASAP
>
> Thanks in advance
>
> shror
> www.s7els7.com
>
What's in $UserEnteredText and $RandomText when you make the test? Echo
them to the window to find out.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|