Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
<> Escape them by putting a slash in front of them. If you have a line of text that says 'This is the problem area I don't want to screw up', put 'This is the problem area I don\'t want to screw up'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] updating pages with php

2003-03-05 Thread Brent Baisley
Before you save the paragraph into the db, use the addslashes() function like this: $textVar = addslashes($textVar); That escapes all the characters like commas, return and whatever else MySQL may have trouble with. The reverse the process before you display it: nl2br(stripslashes($textVar)) T

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
s" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Subject: Re: [PHP] updating pages with php Date: Wed, 5 Mar 2003 13:44:40 -0500 > $Query = "UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = > '$Intro' WHERE ID = '$ID&

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
> $Query = "UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = > '$Intro' WHERE ID = '$ID'"; But what's being sent to SQL? What's contained in $TableName, $Intro_Title, etc.? And what data types are all those fields? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
$Query = "UPDATE $TableName SET Intro_Title = '$Intro_Title', Intro = '$Intro' WHERE ID = '$ID'"; From: "Liam Gibbs" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Subject: Re: [PHP] updating pages with php Dat

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
> What I have discovered is that I can manually type it in the mysql server > with whatever characters I want, but when I try to update it with a sql file > or via the webpage I created with the comma's it gives me errors. I take > them out of the sql text and webpage and it works fine. The proble

Re: [PHP] updating pages with php

2003-03-05 Thread Liam Gibbs
<> Don't forget to escape apostrophes and double quotation marks where needed. Also, check the actual MySQL. If it contains things like double quotation marks or greater- or less-than tags, it may be misinterpreted by your browser when output. A line like: could come out like: <>$%#$" there it

RE: [PHP] updating pages with php

2003-03-05 Thread Tyler Durdin
's it gives me errors. I take them out of the sql text and webpage and it works fine. From: "John W. Holmes" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "'Tyler Durdin'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: [PHP]

RE: [PHP] updating pages with php

2003-03-05 Thread John W. Holmes
> I have a web page with a simple introductory paragraph on it. I was going > to > store the paragraph in a mySQL DB and create an administration page so > people could easily edit the paragraph itself or change it all together. > The > problem I ran into is that mySQL will not allow certain punctu