Re: Thank you Rebecca
| From: | Rebecca Donley | Date: | Wed, 19 Sep 2001 00:16:38 +0000 |
| Subject: | Re: Thank you Rebecca | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-67768@lists.php.net to get a copy of this message | ||
Glad to be of help John. Wish I could think of something a little more elegant. The # seemed like an odd choice to me for a comment line because it's a well used character in both html and common text. I'm surprised it hasn't given a lot of people trouble.
Rebecca
From: John Holcomb <john_6932php@yahoo.com> To: php-general@lists.php.net Subject: [PHP] Thank you Rebecca Date: Tue, 18 Sep 2001 17:00:06 -0700 (PDT) Excellent idea Rebecca. I guess I'll have to resort to this because no one else out there seems to have ever had this problem. You've been a big help. Thank you for your ideas. John --- Rebecca Donley <houserabbit@hotmail.com> wrote: What about writing a function to change all the # characters to something else (maybe something you would never see in the input) and then another to change them back again before entry into your db? I'm pretty new to PHP so I'm not sure what string functions are available but in ASP you could just use a "replace" function. Rebecca_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.aspFrom: John Holcomb <john_6932php@yahoo.com> To: Rebecca Donley <houserabbit@hotmail.com> Subject: Re: [PHP] Is there no one who can help meout there.Date: Tue, 18 Sep 2001 16:48:29 -0700 (PDT) Thank you. This has been the biggest help so far. But, if it's a user entered string is their anywaytodo this without having to parse the string andlookingfor the # sign and then reconstructing the string. That would be very difficult to do. I would appreciate any comments you might have. Thanks again John --- Rebecca Donley <houserabbit@hotmail.com> wrote:pageJohn, I had a similar problem when passing # from oneinto another as an html anchor. What worked for me was separating the #strtolower($row[1]) .quotes as follows: echo "?id=" . $row[0] . "#" .entire'">'; When I did this I had no problem passing theoutstring without the end being interpreted as a comment. RebeccaFrom: John Holcomb <john_6932php@yahoo.com> To: php-general@lists.php.net Subject: [PHP] Is there no one who can help methethere.Date: Tue, 18 Sep 2001 16:29:21 -0700 (PDT) I have a text input field in my form. I needneeduserto be able to enter something like: Hello, Ibutton.#help. After which they click on a submittoThesucceeding page then takes this text and triesThedisplay it and tries to store "Hello, I need #help"in a varchar field in a mysql table column.ismysql database is truncating the # sign and thetextsucceeding the # sign. Also, absolutly no textI'vebeing diplayed on the succeeding web page.usingtriedusing addslashes() and I was warned againstdealinghtmlentities(). Also, I'm not sure if I'mOr,with 2 issues: A mysql issue and a html issue.HTMLamI dealing with one issue: A mysql issue or antext toissue. I know think my problem is that when I passitanother page with the # sign, it's interpretingtheasa comment. Is their any way to somehow escapehttp://dailynews.yahoo.com/fc/US/Emergency_Information/#__________________________________________________sign. Thank you, JohnTerrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information_________________________________________________________________-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:php-general-unsubscribe@lists.php.netFor additional commands, e-mail:php-general-help@lists.php.netTo contact the list administrators, e-mail:php-list-admin@lists.php.nethttp://dailynews.yahoo.com/fc/US/Emergency_Information/ _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netGet your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp__________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information