RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A

Hey Rich,

> > http://www.php.net/ini_set
> > http://www.php.net/manual/en/ini.php#ini.list
> 
> If it's on, and you have no access to change it, get
> a new webhost.
> :-)

Unfortunatly cant do that :-(

Heres my environment, I am one of two developers, 3
designers, 2 graphic artists and a bunch of professors
and bosses (yes, you read right, more than one boss)
Other than me 1 person understands proper code, the
designers know a bit of JS, jut enough to scrape
through, nobody likes code other than the other guy
and me.


> Cuz, really, you're going to just end up being too
> crippled in the
> long run with that restrictive an environment...

True, but the government have given this firm a
project and its been passed onto us to do, the govt
have given two servers, 1 server for us to test on and
them to check up on, the second server to up the final
product once done...we dont even have access to the
final server as yet, I have not had a chance to test
on the first server as yet :-(


> I realize that people writing code for mass
> distribution is a whole
> 'nother ball of wax, but the OP isn't in that group,
> I don't think.

I am not in that group, but it sure feels like it
because I have not had a chance to get my feet wet
with the actual servers.

Hopefully by Monday I will get access to the first
one, then will be back on the list with my new
problems ;), till then, I find the template thread
quite interesting :D

Cheers!

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Richard Lynch
On Wed, June 28, 2006 11:52 am, Jay Blanchard wrote:
> [snip]
>> 1. Turn magic_quotes OFF -- it's just a PITA anyway.
>
> if magic_quotes_gpc is on in the php.ini and you don;t have the
> access to change this then you have a problem if your code doesn't do
> something to counter it.
> [/snip]
>
> http://www.php.net/ini_set
> http://www.php.net/manual/en/ini.php#ini.list

If it's on, and you have no access to change it, get a new webhost.
:-)

Cuz, really, you're going to just end up being too crippled in the
long run with that restrictive an environment...

I realize that people writing code for mass distribution is a whole
'nother ball of wax, but the OP isn't in that group, I don't think.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Richard Lynch
On Wed, June 28, 2006 4:29 am, Ryan A wrote:
> I am doing this as I am putting the entire content of
> a html page into the DB and the double quotes are
> screwing things up for me.
...
> Or if I am barking up the wrong tree

Fix your DB insert to handle the double quotes.

I don't really know, or care, if it's possible to make DreamWeaver do
what you think you want it to do.

But if your DB insert can't handle the quotes, something is wrong with
your DB insert.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread tedd
At 6:40 PM +0200 6/28/06, Jochem Maas wrote:
>
> > 3. Then use htmlentities() to retrieve the pages.
>
>grand. so then he'll have stuff like '>body<'
>probably not what he wants - granted you can use regular expressions
>to change all the content *between* the tags he actually wants to
>output which be closer to the to what he might want but even then you
>have to be careful not to 'entitize' stuff that was already existing
>as html entities in the data coming from the DB otherwise he ends
>up with stuff like:
>
>   '< & > are characters with
>special meaning in HTML and should be html encoded as
>&lt; &amp; &gt;'.
>
>I guess now is not the time to freak Ryan with all the potential
>problems related to charset encoding :-)

Ah yes -- you are absolutely right. I was thinking about displaying the output 
directly to a browser for review.

I imagine that what Ryan wants is to display the html exactly as it was 
gathered and thus displayed AS a web page.

In that case, Ryan, don't use htmlentities() to retrieve the data -- just get 
it. It will be as it was, so sayth tedd. As it is written, so it shall be done.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jochem Maas
Jay Blanchard wrote:
> [snip]
>> 1. Turn magic_quotes OFF -- it's just a PITA anyway.
> 
> if magic_quotes_gpc is on in the php.ini and you don;t have the
> access to change this then you have a problem if your code doesn't do
> something to counter it.
> [/snip]

by the time your script can call an ini_set() on magic_quotes_gpc
the magic quoting will have occurred. so that doesn't help.
note that values set via ini_set() are only valid for the current request.

my point about not having access to change the value referred to
not being able to change php.ini or override the value in a .htaccess

> 
> http://www.php.net/ini_set
> http://www.php.net/manual/en/ini.php#ini.list
> 
> 

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jay Blanchard
[snip]
> 1. Turn magic_quotes OFF -- it's just a PITA anyway.

if magic_quotes_gpc is on in the php.ini and you don;t have the
access to change this then you have a problem if your code doesn't do
something to counter it.
[/snip]

http://www.php.net/ini_set
http://www.php.net/manual/en/ini.php#ini.list

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jochem Maas
tedd wrote:
> At 2:29 AM -0700 6/28/06, Ryan A wrote:
>> -snip-
>>
>> Or if I am barking up the wrong tree and this is not
>> possible (changing DWs default behavior, just tell me
>> and will stop searching.
>>
>> Thanks!
>> Ryan
> 
> Ryan:
> 
> I don't see a problem with using:
> 
> 1. Turn magic_quotes OFF -- it's just a PITA anyway.

if magic_quotes_gpc is on in the php.ini and you don;t have the
access to change this then you have a problem if your code doesn't do
something to counter it.

> 
> 2. Then use mysql_real_escape_string() to store your html in the dB.

agreed.

> 
> 3. Then use htmlentities() to retrieve the pages.

grand. so then he'll have stuff like '>body<'
probably not what he wants - granted you can use regular expressions
to change all the content *between* the tags he actually wants to
output which be closer to the to what he might want but even then you
have to be careful not to 'entitize' stuff that was already existing
as html entities in the data coming from the DB otherwise he ends
up with stuff like:

'< & > are characters with
 special meaning in HTML and should be html encoded as
 &lt; &amp; &gt;'.

I guess now is not the time to freak Ryan with all the potential
problems related to charset encoding :-)

> 
> It works for me.
> 
> tedd

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread tedd
At 9:16 AM -0500 6/28/06, Jay Blanchard wrote:
>[snip]
>> Just how does one launch a "DOS" attack?
>[/snip]
>
>Insult Bill Gates.

Hey, give Bill a break -- after all, if it weren't for him, our lives would be 
a lot simpler.

Maybe he'll do the same thing for medical research with his charity donations 
and string-attached directions. :-)

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A

> Ryan:
> 
> I don't see a problem with using:
> 
> 1. Turn magic_quotes OFF -- it's just a PITA anyway.

True
 
> 2. Then use mysql_real_escape_string() to store your
> html in the dB.
> 
> 3. Then use htmlentities() to retrieve the pages.

Thanks!
Ryan
 
 


--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread tedd
At 2:29 AM -0700 6/28/06, Ryan A wrote:
>-snip-
>
>Or if I am barking up the wrong tree and this is not
>possible (changing DWs default behavior, just tell me
>and will stop searching.
>
>Thanks!
>Ryan

Ryan:

I don't see a problem with using:

1. Turn magic_quotes OFF -- it's just a PITA anyway.

2. Then use mysql_real_escape_string() to store your html in the dB.

3. Then use htmlentities() to retrieve the pages.

It works for me.

tedd
-- 

http://sperling.com  http://ancientstones.com  http://earthstones.com

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jay Blanchard
[snip]
> Just how does one launch a "DOS" attack?
[/snip]

Insult Bill Gates.

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread John Nichel

Ryan A wrote:
 

Just how does one launch a "DOS" attack?

c:\ fdisk
c:\ format
Repeat as needed

?

--



Damn John, 
now anybody who wants to start DDOSing knows the
secret. 



Well then, they still have some research to do for launching a DoS attack.

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A
 
> Just how does one launch a "DOS" attack?
> 
> c:\ fdisk
> c:\ format
> Repeat as needed
> 
> ?
> 
> -- 


Damn John, 
now anybody who wants to start DDOSing knows the
secret. 

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread John Nichel

Ryan A wrote:

Hey,


Am really starting to like your emails on this

list,

its different to say the least!

seeing as you didn't threat to DoS my server I guess
I'm
not trying hard enough to be different ;-)



Oops, sorry about that, let me try again:
You , how dare you say that, I
am now going to DOS your serverafter I learn how
to properly launch a DOS attack, and after I get a
botnet (i have one computer so far) and after I know i
can cover my tracks, and after i DOS others that
really irritate me (RIAA/MPAA etc).

Ok, its a horrorable threat but gimme a break, first
time I ever threatened to DOS anyone. 
:o)


Just how does one launch a "DOS" attack?

c:\ fdisk
c:\ format
Repeat as needed

?

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A


> Change the default in Dream Weaver?   Can you be
> sure that all people 
> now and in the future who will be entering data into
> your db will be 
> using your 'modified' version of Dream Weaver? 
> Forget Dream Weaver, and 
> worry about the input datanever trust user
> input.

Makes sense, thanks for your input.

Cheers!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A

Thanks Jay, will stop searching and use the advise
from Prathaban  and Jochem.

Thread closed as far as I'm concerned.

Cheers!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A
Hey,

> > Am really starting to like your emails on this
> list,
> > its different to say the least!
> 
> seeing as you didn't threat to DoS my server I guess
> I'm
> not trying hard enough to be different ;-)


Oops, sorry about that, let me try again:
You , how dare you say that, I
am now going to DOS your serverafter I learn how
to properly launch a DOS attack, and after I get a
botnet (i have one computer so far) and after I know i
can cover my tracks, and after i DOS others that
really irritate me (RIAA/MPAA etc).

Ok, its a horrorable threat but gimme a break, first
time I ever threatened to DOS anyone. 
:o)


> > Why is it plain silly? 

 
> for the block of data your going to enter in the db
> it's
> a single call to the function. and the cpu cycles
> required
> is peanuts in real terms. it's kind of similar to a
> call to
> output_add_rewrite_var() which essentially buffers
> and parse through
> the complete output of a given script - something
> which works fine under
> normal conditions (e.g. your not in the realms of
> yahoo-like levels
> of page views).
> 
> if you have 1000's of users inserting/updating
> 'large' chunks
> of HTML all day ever day then you probably have a
> different
> problem - one that probably requires a server farm
> or something
> - but if your in that realm the not using of
> msyql_real_escape_string()
> will still not be the solution.


Hmm, thanks for clearing that up, as gratitude even
after i learn to DOS and have my botnet up in  a few
years I shall spare your server.

Cheers!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread John Nichel

Ryan A wrote:


--- Prathaban Mookiah <[EMAIL PROTECTED]> wrote:


Are you trying to use PHP to write the HTML onto a
database. If this is the 
case you can simply use addslashes(). This way you
can still preserve the 
double quotes, but write into the database without

any problems.

Either way some processing will be involved at some
point. So I guess there is 
not much you can do about it.


Prathap





Hello,
Yes, I want to write the HTML to the DB, and I know
other than str_replace I have the option of
addslashes, but with addslashes I have to take into
account magic_quotes being on/off...and since this is
going to be used on a few servers it just complicates
matters a bit more, I am trying to take the guesswork


So check the value of magic_quotes before you escape your data.  If this 
is MySQL, use mysql_real_escape_string() and not addslashes()



and extra coding out of the scripts and solve the
problem before it comes to the scripts...by changeing
the default in DW.



Change the default in Dream Weaver?   Can you be sure that all people 
now and in the future who will be entering data into your db will be 
using your 'modified' version of Dream Weaver?  Forget Dream Weaver, and 
worry about the input datanever trust user input.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jay Blanchard
[snip]
By default dreamweaver outputs tags like this:


[/snip]

This is the proper format for an HTML tag, all attributes should be
double quoted.

[snip]
Or if I am barking up the wrong tree and this is not
possible (changing DWs default behavior, just tell me
and will stop searching. 
[/snip]

I think that you are barking up the wrong tree and what you need to do
is learn how to escape quotes going into the database properly. Usually
it is single quotes that provide the most headaches as values being
inserted into columns are typically single quoted, so your change ends
up only inserting

'

Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jochem Maas
Ryan A wrote:
> Hey,
> Am really starting to like your emails on this list,
> its different to say the least!

seeing as you didn't threat to DoS my server I guess I'm
not trying hard enough to be different ;-)

> 
>>> mysql_escape_string does look interesting but
>> thats
>>> again putting the strain in the script which I am
>> wtf? that is just plain silly.
> 
> Why is it plain silly? if the text to be entered is a
> large html page with a lot of class="value" and font
> color="red" class="blah" etc it can mean a lot of
> escaping/processing

for the block of data your going to enter in the db it's
a single call to the function. and the cpu cycles required
is peanuts in real terms. it's kind of similar to a call to
output_add_rewrite_var() which essentially buffers and parse through
the complete output of a given script - something which works fine under
normal conditions (e.g. your not in the realms of yahoo-like levels
of page views).

if you have 1000's of users inserting/updating 'large' chunks
of HTML all day ever day then you probably have a different
problem - one that probably requires a server farm or something
- but if your in that realm the not using of msyql_real_escape_string()
will still not be the solution.

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A
Hey,
Am really starting to like your emails on this list,
its different to say the least!

> > mysql_escape_string does look interesting but
> thats
> > again putting the strain in the script which I am
> 
> wtf? that is just plain silly.

Why is it plain silly? if the text to be entered is a
large html page with a lot of class="value" and font
color="red" class="blah" etc it can mean a lot of
escaping/processing

 
> btw if you read the following manual page:
> 
>   http://php.net/mysql_escape_string
> 
> it will tell you that that func is depreciated - and
> that there is
> a better alternative: mysql_real_escape_string()



Yes, I did visit see that.


 
> > trying to avoid, may have to do it in the end
> though.
> > 
> >>  I guess you have wait till some DW guru in
> this
> > mailing  list.
> 
> changing " to ' in any given input and/or making
> that a requirement of
> your input routine is a brittle 'solution' - in
> short it sucks.
> what happens when freak/code/user X tries stuffing
> in a " regardless of
> what you have preached/documented/'hoped no-one
> would do'?

No, I *WILL* have a check before inserting to the DB
as a "just in case" solution but basicially this is
just for the company's designers and if I can get
their DWs to output single quotes instead of
double.
We have 3 designers, they will be putting in the
entire "content table" (the table that contains all
the content for that page) into the db by copying from
DW then pasting the "raw code" into the text area that
I am giving them...then I take that code and enter it
into the DB. Nobody other than them will be entering
data into the system, the outside world will just see
the tutorials.

> > 
> >> Good luck.
> > 
> > Yep, am waiting here and from some forums,
> hopefully
> > someone will give me a break on this.
> 
> which limb? and why the masochism?

:-)


 
> > Thanks for the well wishes.
> > 
> 
> as opposed to wishing wells.

:)



Cheers,
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Jochem Maas
Ryan A wrote:
> 

...

> mysql_escape_string does look interesting but thats
> again putting the strain in the script which I am

wtf? that is just plain silly.

btw if you read the following manual page:

http://php.net/mysql_escape_string

it will tell you that that func is depreciated - and that there is
a better alternative: mysql_real_escape_string()

> trying to avoid, may have to do it in the end though.
> 
>>  I guess you have wait till some DW guru in this
> mailing  list.

changing " to ' in any given input and/or making that a requirement of
your input routine is a brittle 'solution' - in short it sucks.
what happens when freak/code/user X tries stuffing in a " regardless of
what you have preached/documented/'hoped no-one would do'?

you need a routine that *properly* escapes you data before you
insert it into the database.

> 
>> Good luck.
> 
> Yep, am waiting here and from some forums, hopefully
> someone will give me a break on this.

which limb? and why the masochism?

> Thanks for the well wishes.
> 

as opposed to wishing wells.

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A


--- Prathaban Mookiah <[EMAIL PROTECTED]> wrote:

> Yes, I got into trouble with magic quotes recently
> too.
> 
> Well I know that you can do the same thing with
> mysql_escape_string if you are 
> using MySQL.
> 
> But if you are very peculiar about doing it in DW
> and so not want the script 
> to handle it, then I guess you have wait till some
> DW guru in this mailing 
> list.
> 
> Good luck.
> 

Hey,
Thanks for replying.
I though magic quotes was a blessing when I first
started php, but as I advanced in my learning I saw
that magic quotes and register globals are actually
double edged swords worth more trouble than the
advantages they offer.

mysql_escape_string does look interesting but thats
again putting the strain in the script which I am
trying to avoid, may have to do it in the end though.

>  I guess you have wait till some DW guru in this
mailing  list.

> Good luck.

Yep, am waiting here and from some forums, hopefully
someone will give me a break on this.

Thanks for the well wishes.

Cheers!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Prathaban Mookiah
Are you trying to use PHP to write the HTML onto a database. If this is the 
case you can simply use addslashes(). This way you can still preserve the 
double quotes, but write into the database without any problems.

Either way some processing will be involved at some point. So I guess there is 
not much you can do about it.

Prathap




-- Original Message ---
From: Ryan A <[EMAIL PROTECTED]>
To: php php 
Sent: Wed, 28 Jun 2006 02:29:45 -0700 (PDT)
Subject: [PHP] Single quotes verses double quotes default behavior with DW ---
-----> (Pretty much 0T )

> Hi,
> 
> I have searched for this answer on google and even
> written on a few forums asking for an answer, am just
> trying my luck here as I am sure quite a few list
> users use DreamWeaver.
> 
> By default dreamweaver outputs tags like this:
> 
> 
> 
> As you can see from the above the values are always
> enclosed in double quotes by default, how can i change
> the default to be single quotes?
> 
> eg:
> 
> 
> I am tired of everytime copying it into notepad and
> then running a replace all before inserting it into
> the db.
> 
> I am doing this as I am putting the entire content of
> a html page into the DB and the double quotes are
> screwing things up for me.
> I have thought of doing a str_replace() for the double
> quotes but thats extra processing which can be a
> headache if its a large page.
> 
> Or if I am barking up the wrong tree and this is not
> possible (changing DWs default behavior, just tell me
> and will stop searching.
> 
> Thanks!
> Ryan
> 
> --
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Prathaban Mookiah
Yes, I got into trouble with magic quotes recently too.

Well I know that you can do the same thing with mysql_escape_string if you are 
using MySQL.

But if you are very peculiar about doing it in DW and so not want the script 
to handle it, then I guess you have wait till some DW guru in this mailing 
list.

Good luck.

Prathap


-- Original Message ---
From: Ryan A <[EMAIL PROTECTED]>
To: Prathaban Mookiah <[EMAIL PROTECTED]>, php php <[EMAIL PROTECTED]
net>
Sent: Wed, 28 Jun 2006 03:10:27 -0700 (PDT)
Subject: Re: [PHP] Single quotes verses double quotes default behavior with DW 
----> (Pretty much 0T )

> --- Prathaban Mookiah <[EMAIL PROTECTED]> wrote:
> 
> > Are you trying to use PHP to write the HTML onto a
> > database. If this is the 
> > case you can simply use addslashes(). This way you
> > can still preserve the 
> > double quotes, but write into the database without
> > any problems.
> > 
> > Either way some processing will be involved at some
> > point. So I guess there is 
> > not much you can do about it.
> > 
> > Prathap
> > 
> > 
> >
> 
> Hello,
> Yes, I want to write the HTML to the DB, and I know
> other than str_replace I have the option of
> addslashes, but with addslashes I have to take into
> account magic_quotes being on/off...and since this is
> going to be used on a few servers it just complicates
> matters a bit more, I am trying to take the guesswork
> and extra coding out of the scripts and solve the
> problem before it comes to the scripts...by changeing
> the default in DW.
> 
> Thanks!
> Ryan
> 
> --
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

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



Re: [PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A


--- Prathaban Mookiah <[EMAIL PROTECTED]> wrote:

> Are you trying to use PHP to write the HTML onto a
> database. If this is the 
> case you can simply use addslashes(). This way you
> can still preserve the 
> double quotes, but write into the database without
> any problems.
> 
> Either way some processing will be involved at some
> point. So I guess there is 
> not much you can do about it.
> 
> Prathap
> 
> 
> 

Hello,
Yes, I want to write the HTML to the DB, and I know
other than str_replace I have the option of
addslashes, but with addslashes I have to take into
account magic_quotes being on/off...and since this is
going to be used on a few servers it just complicates
matters a bit more, I am trying to take the guesswork
and extra coding out of the scripts and solve the
problem before it comes to the scripts...by changeing
the default in DW.

Thanks!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[PHP] Single quotes verses double quotes default behavior with DW --------> (Pretty much 0T )

2006-06-28 Thread Ryan A
Hi,

I have searched for this answer on google and even
written on a few forums asking for an answer, am just
trying my luck here as I am sure quite a few list
users use DreamWeaver.

By default dreamweaver outputs tags like this:



As you can see from the above the values are always
enclosed in double quotes by default, how can i change
the default to be single quotes?

eg:


I am tired of everytime copying it into notepad and
then running a replace all before inserting it into
the db.

I am doing this as I am putting the entire content of
a html page into the DB and the double quotes are
screwing things up for me.
I have thought of doing a str_replace() for the double
quotes but thats extra processing which can be a
headache if its a large page.

Or if I am barking up the wrong tree and this is not
possible (changing DWs default behavior, just tell me
and will stop searching. 

Thanks!
Ryan

--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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