On Sun, 2003-08-31 at 10:11, Curt Zirzow wrote: > * Thus wrote Jeremy Johnstone ([EMAIL PROTECTED]): > > > > $email->body = "This is a test email. Testing c:\test\foo.exe"; > > > > When the $email object is later broke down and stored in the database > > addslashes is done (as it should be) before the variable is stored. > > > > If you check the database though, no slashes were added to the string. > > addslashes() is working properly. What you're experiencing is > the database servers' translation of '\\' -> '\'. > > The documentation on addslashes explains this: > http://php.net/addslashes
You might want to check the documentation again as it does not say anything about the db server translating \\ into \. This seems highly illogical, because if thats the case then addslashes("This is Jeremy's test of c:\test\foo.exe") would get corrupted when you strippedslashes after you pulled it back out of the database. If this is the case, which database servers translate this way? I will then make sure I go update the documentation accordingly. > > > > I am doing something wrong (or did I misunderstand something) or is this > > in fact a bug? I have tested it on PHP 4.2, 4.3.2, and 4.3.3 and the > > btw, you should post these questions to the php-general list, > especially when you are in doubt if you're using the function > properly. > Actually I was quite sure I was using the function correctly, I said that in case I misunderstood something in the documentation and thus needed to update the documentation accordingly. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php