Re: [PHP] Simple script but confusion with comparing strings (SOLVED)

2004-01-31 Thread Ryan A
Hey, Thanks, it worked! -Ryan On 2/1/2004 1:13:32 AM, Stuart ([EMAIL PROTECTED]) wrote: > Ryan A wrote: > > $somecontent = strtoupper(md5($type)); > > compared to... > > > if(strcmp($contents,md5("1"))==0) > > Comparing uppercase to lowercase (md5 generates a lowercase string). > Either remove

Re: [PHP] Simple script but confusion with comparing strings

2004-01-31 Thread Stuart
Ryan A wrote: $somecontent = strtoupper(md5($type)); compared to... if(strcmp($contents,md5("1"))==0) Comparing uppercase to lowercase (md5 generates a lowercase string). Either remove the strtoupper when first generated, strtoupper the md5 result in the comparison or use strcasecmp instead of s

[PHP] Simple script but confusion with comparing strings

2004-01-31 Thread Ryan A
Hi, Just fooling around with fwrite and fread when i seem to have hit a wall. Basically, what i am trying to do is, make an md5 hash of a number, write that number to a file. A bit later read the hash from that file and compare it to a number, if its 1, then print 1 , if 2 print 2... I have tried 2