Ahha, i see.

Hmm well you can make your own addslashes function like this. Add the
following line at the beginning of the php code

function superaddslashes($input) {
        return ereg_replace ('"', '\"', $input);
    }

Then you can do
$Notes = superaddslashes($Notes);

----- Original Message -----
From: "Todd Williamsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 11:54 PM
Subject: Re: [PHP-DB] addslashes()


> Ok..
>
> i tried it out... and it almost works like I want it... weird though
>
> 1. when I put in <p><font color="blue">this is BLUE</p></font>
>
> it prints it in like a bright green.  but if i use the RGB # then its
fine.
> weird....
>
> 2.  if there is an apostrophe in the notes, then it will add slashes it to
> that as well
>
> so if I type blah blah blah I am going over to my friend's website later
on
> and here is the address...
>
> <a href="http://friends.com>Friends</a>
>
> it will look like
>
> friend\\\'s
>
> Friends(link)
>
> .
> "Acealex" <[EMAIL PROTECTED]> wrote in message
> 002001c1b027$ec33b7b0$e4d22fc2@acealex">news:002001c1b027$ec33b7b0$e4d22fc2@acealex...
> > Try
> > $Notes = addslashes($Notes);
> >
> > You where almost right :)
> >
> > /Alexander
> >
> > ----- Original Message -----
> > From: "Todd Williamsen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 07, 2002 11:32 PM
> > Subject: [PHP-DB] addslashes()
> >
> >
> > > I have a "Notes" field where users can add notes.  Now, there will be
> > times
> > > when they use quotes "" or maybe even HTML, what is the correct way of
> > using
> > > this function?
> > >
> > > I have tried:
> > >
> > > addslashes($Notes);
> > >
> > > and
> > >
> > > $Notes addslashes($Notes);
> > >
> > > neither work..
> > >
> > > I thought I would ask this great newsgroup!
> > >
> > > Thanks
> > >
> > >
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to