Re: [PHP] comparison operators

2001-05-21 Thread Christian Reiniger
On Monday 21 May 2001 08:03, Heidi Belal wrote: > I have a form where i let people choose a file to > upload, but i want to limit them to image files only. > So i want to only allow the .gif and .jpg to be > uploaded. What i tried doing was this: > if ($filename_type == "image/gif") >-- uplo

Re: [PHP] comparison operators

2001-05-20 Thread Diego Pérez Rández
Hi: For compare strings you can use strcmp. $st1 = "hi"; $st2 = "bye"; if (strcmp($st1, $st2)) { echo "are different"; } else { echo "are equal"; } The strcmp return 0 when the strings are equal. If the strings are diferent, return the pos of the char where begin the diference.