Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Jason Wong

On Friday 03 May 2002 17:07, Mikael Syska wrote:
 I have made a phpscript to register all things on a computer, and then it
 stores the information in a database, but php converts \\CADS1\HP2100PCL to
 CADS1\\HP2100PCL how can I force PHP to not do that cause CADS1
 \\HP2100PCL aint a right address for a printer, cause there are too many
 \\, hope the are someone that can help me.

After you've retrieved the info from the database run it through 
stripslashes() before displaying it.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
God made the integers; all else is the work of Man.
-- Kronecker
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Mikael Syska

[EMAIL PROTECTED] (Jason Wong) wrote in news:php.general-95846
@news.php.net:

 stripslashes()

thanks, now it works

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Jason Wong

On Friday 03 May 2002 17:29, Mikael Syska wrote:
 [EMAIL PROTECTED] (Jason Wong) wrote in news:php.general-95846

 @news.php.net:
  stripslashes()

 thanks, now it works

Do read up on /why/ you need it.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Rule of Life #1 -- Never get separated from your luggage.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Mikael Syska

[EMAIL PROTECTED] (Jason Wong) wrote in news:php.general-95848
@news.php.net:

 @news.php.net:
  stripslashes()

 thanks, now it works
 
 Do read up on /why/ you need it.
 

ohhh, what do u mean???

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Jason Wong

On Friday 03 May 2002 17:37, Mikael Syska wrote:
 [EMAIL PROTECTED] (Jason Wong) wrote in news:php.general-95848

 @news.php.net:
  @news.php.net:
   stripslashes()
 
  thanks, now it works
 
  Do read up on /why/ you need it.

 ohhh, what do u mean???

OK, at the very least read the manual entries for 

addslashes()
stripslashes()

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Smoking is, as far as I'm concerned, the entire point of being an adult.
-- Fran Lebowitz
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php converts \ to \\, how can I stop that

2002-05-03 Thread Mike Eheler

You could also set these values in your php.ini:

magic_quotes_gpc = off
magic_quotes_runtime = off

If you do this, then remember when inserting the data into a mysql 
database, it still needs to be escaped:

$sql = sprintf(
 insert into table (id, field) values ('', '%s'),
 mysql_escape_string($fieldvalue)
);

Mike

Mikael Syska wrote:
 [EMAIL PROTECTED] (Jason Wong) wrote in news:php.general-95848
 @news.php.net:
 
 
@news.php.net:

stripslashes()

thanks, now it works

Do read up on /why/ you need it.


 
 ohhh, what do u mean???
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php