Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Why does "\" always appear in my forms?

 
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  site review  
Author Message
kkiely

External


Since: Aug 12, 2003
Posts: 105



(Msg. 1) Posted: Fri Jan 23, 2004 6:12 am
Post subject: Why does "\" always appear in my forms?
Archived from groups: alt>www>webmaster (more info?)

When i write a form-to-text file a "\" always appreas. Why is this?

 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 2) Posted: Fri Jan 23, 2004 6:12 am
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 23 Jan 2004 03:12:00 GMT, Kkiely <kkiely.RemoveThis@aol.comnojunk> wrote:

 > When i write a form-to-text file a "\" always appreas. Why is this?

When POSTing a form, slashes are usually added before quote chracters like
" and '. I don't know whether this is added by the browser sending the
info or the server recieving it, but they happen. Perhaps someone could
enlighten me on that.

Anyway, Duende has it right if you're using PHP to handle the form input.
Use the stripslashes() function to get rid of those nasty slashes. But if
you're planning on putting that form input into a SQL database don't
forget to add them back in with addslashes() !

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - ORCA - Camouflaged PHP Web Scripts.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
user162

External


Since: Jul 31, 2003
Posts: 67



(Msg. 3) Posted: Fri Jan 23, 2004 6:47 am
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Kkiely" <kkiely.DeleteThis@aol.comnojunk> wrote in message
news:20040122221200.22719.00000603@mb-m18.aol.com...

 > When i write a form-to-text file a "\" always appreas. Why is this?

You need to trim your fingernails. They are catching on the \ button (just
above Enter) when you save the file.

Cheers
Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
xxxspam

External


Since: Jan 08, 2004
Posts: 199



(Msg. 4) Posted: Fri Jan 23, 2004 6:57 am
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While sitting in a puddle Kkiely scribbled in the mud:

 > When i write a form-to-text file a "\" always appreas. Why is this?

If it's a php script look into stripslashes()

--
Duende<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 5) Posted: Fri Jan 23, 2004 9:19 pm
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post: <news:20040122221200.22719.00000603@mb-m18.aol.com>
kkiely.RemoveThis@aol.comnojunk (Kkiely) said:

 > When i write a form-to-text file a "\" always appreas.

its the backslash gods. so named due to their technique with the sword
when decapitating their worshipers.

 > Why is this?

some characters need to be escaped before doing fun things like writing
them to a db. your scripting language may add them by default on method
post whether they're needed or not.

--
brucie - i usenet nude<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
alan

External


Since: Jul 01, 2003
Posts: 56



(Msg. 6) Posted: Sat Jan 24, 2004 1:10 am
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Carved in mystic runes upon the very living rock, the last words of Duende
of alt.www.webmaster make plain:

 > While sitting in a puddle Kkiely scribbled in the mud:
 >
  >> When i write a form-to-text file a "\" always appreas. Why is this?
 >
 > If it's a php script look into stripslashes()

Or better yet, turn off magic_quotes in your PHP configuration. I love PHP
dearly, but there are a few things about it that are just plain irritating.

--
Alan Little
Phorm PHP Form Processor
<a style='text-decoration: underline;' href="http://www.phorm.com/" target="_blank">http://www.phorm.com/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
jstucklex

External


Since: Jul 14, 2003
Posts: 1507



(Msg. 7) Posted: Tue Jan 27, 2004 3:22 pm
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:
 >
 > On 23 Jan 2004 03:12:00 GMT, Kkiely <kkiely RemoveThis @aol.comnojunk> wrote:
 >
  > > When i write a form-to-text file a "\" always appreas. Why is this?
 >
 > When POSTing a form, slashes are usually added before quote chracters like
 > " and '. I don't know whether this is added by the browser sending the
 > info or the server recieving it, but they happen. Perhaps someone could
 > enlighten me on that.
 >
 > Anyway, Duende has it right if you're using PHP to handle the form input.
 > Use the stripslashes() function to get rid of those nasty slashes. But if
 > you're planning on putting that form input into a SQL database don't
 > forget to add them back in with addslashes() !
 >
 > Grey
 >
 > --
 > The technical axiom that nothing is impossible sinisterly implies the
 > pitfall corollory that nothing is ridiculous.
 > - <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - ORCA - Camouflaged PHP Web Scripts.


Actually, SQL doesn't use backslashes as escape characters.

--

To reply, delete the 'x' from my email
Jerry Stuckle,
JDS Computer Training Corp.
jstucklex RemoveThis @attglobal.net
Member of Independent Computer Consultants Association - <a style='text-decoration: underline;' href="http://www.icca.org" target="_blank">www.icca.org</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 8) Posted: Tue Jan 27, 2004 3:30 pm
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 27 Jan 2004 12:22:23 -0500, Jerry Stuckle
<jstucklex DeleteThis @attglobal.net> wrote:

 > GreyWyvern wrote:
  >>
  >> On 23 Jan 2004 03:12:00 GMT, Kkiely <kkiely DeleteThis @aol.comnojunk> wrote:
  >>
   >> > When i write a form-to-text file a "\" always appreas. Why is this?
  >>
  >> When POSTing a form, slashes are usually added before quote chracters
  >> like
  >> " and '. I don't know whether this is added by the browser sending the
  >> info or the server recieving it, but they happen. Perhaps someone could
  >> enlighten me on that.
  >>
  >> Anyway, Duende has it right if you're using PHP to handle the form
  >> input.
  >> Use the stripslashes() function to get rid of those nasty slashes. But
  >> if
  >> you're planning on putting that form input into a SQL database don't
  >> forget to add them back in with addslashes() !
  >>
 >
 > Actually, SQL doesn't use backslashes as escape characters.

You're right, it doesn't. But the queries sent by the PHP function
mysql_query() do if you use ""! Smile What's troubling about that is that
you'll get no error message from MySQL if a query fails because it's not
escaped properly through PHP.

I remember wondering for a long while why my INSERTs weren't working when
one of the fields I was trying to input contained a single quote '
character.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca RingMaker: PHP web ring creation and
management<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
davidvb3

External


Since: Nov 10, 2003
Posts: 272



(Msg. 9) Posted: Wed Jan 28, 2004 8:01 pm
Post subject: Re: Why does "\" always appear in my forms? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

GreyWyvern wrote:
 > On Tue, 27 Jan 2004 12:22:23 -0500, Jerry Stuckle
 > <jstucklex.TakeThisOut@attglobal.net> wrote:
 >
  >> GreyWyvern wrote:
  >>
   >>>
   >>> On 23 Jan 2004 03:12:00 GMT, Kkiely <kkiely.TakeThisOut@aol.comnojunk> wrote:
   >>>
   >>> > When i write a form-to-text file a "\" always appreas. Why is this?
   >>>
   >>> When POSTing a form, slashes are usually added before quote chracters
   >>> like
   >>> " and '. I don't know whether this is added by the browser sending the
   >>> info or the server recieving it, but they happen. Perhaps someone could
   >>> enlighten me on that.
   >>>
   >>> Anyway, Duende has it right if you're using PHP to handle the form
   >>> input.
   >>> Use the stripslashes() function to get rid of those nasty slashes.
   >>> But if
   >>> you're planning on putting that form input into a SQL database don't
   >>> forget to add them back in with addslashes() !
   >>>
  >>
  >> Actually, SQL doesn't use backslashes as escape characters.
 >
 >
 > You're right, it doesn't. But the queries sent by the PHP function
 > mysql_query() do if you use ""! Smile What's troubling about that is that
 > you'll get no error message from MySQL if a query fails because it's not
 > escaped properly through PHP.
 >
 > I remember wondering for a long while why my INSERTs weren't working
 > when one of the fields I was trying to input contained a single quote '
 > character.

First thing I do when I have a mysql problem is echo the sql statement
that has been generated in the problem case.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Why does "" always appear in my forms? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Order forms - I've been trying ... with little success ... to create an order form, listing various products c/w prices to include on my site. Does anyone know of any forms (which can be customized) available on the web ? TIA, David

Email Forms ? - Can anybody help me make a email form for my Nominate and Apply pages at http://www.SurroundedByAngels.com ? I think an email form would make it look so much better . SBA

Graphics Buttons and Forms - I did a stupid thing...I told someone, if they wanted, I'd use graphics buttons in place of the usual submit button on a form. I had a form with three different submit buttons...each with a different value and each value passed to a php script, then a..

Error when answering the forms - Hi, As I have put some form in a page with the usual syntax : <form action="mailto:mail_adress ...> Some people experience the (somehow) following message when they confirm the form (action on input of type submit). "failure on transmi...

JavaScript submit forms with email???? - does anyone know how should I do this??? Im not so good in JS
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]