--- Pieter <[EMAIL PROTECTED]> wrote: > I recently started coding online and i have the weirdest response, > my code is: > > if ($id = "add" )
When you convert the string "add" to a boolean, it equates to true. I'm assuming you want to be using a conditional expression rather than an assignment statement. Either this was a typo, or you should really read a lot of introductory material on PHP's syntax, as I'm guessing this is your first programming language. Start with the PHP manual: http://www.php.net/manual/ Expressions are discussed here: http://www.php.net/manual/en/language.expressions.php PHP's conditional expressions are given as follows: -------------------------------------------------- PHP supports > (bigger than), >= (bigger than or equal to), == (equal), != (not equal), < (smaller than) and <= (smaller than or equal to). -------------------------------------------------- Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php