For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > September 2004 > Re: [PHP-DB] The variable $_SERVER['AUTH_USER'] gives domain\\username problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] The variable $_SERVER['AUTH_USER'] gives domain\\username problem
Ramil Sagum

2004-09-30, 8:56 pm

On Fri, 1 Oct 2004 10:27:45 +1000, justin.baiocchi@csiro.au
<justin.baiocchi@csiro.au> wrote:
> Hi,
>
> When I use the variable $_SERVER['AUTH_USER'] it comes out as
> domain\\username when inserted into the MySQL database. So when I try to
> update the record looking for a match as below it doesn't work because
> the query is looking for where ident=domain\username.
>
> $result = mysql_query("UPDATE aec SET filename='$filename' WHERE
> ident='".$_SERVER['AUTH_USER']."'") or die (mysql_error());
>
> Anybody know what I am doing wrong?



In MySQL, \ is an escape character. \\ stands for an actual \.

for details, just click the link and read on

http://www.php.net/manual/en/functi...cape-string.php




----

ramil
http://ramil.sagum.net
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com