Jump to content

Escape quote does not work


PHP5000

Recommended Posts

Hello

I have been coding in PHP since at least 15 years ago, but there has been a gap for the last 4 years.  Now many things that I had done perfectly well in the past does not work.  For example /" which I used hundreds if not thousands of time when passing a string from a form to a database or vice versa no longer works.  Example is: \"Your inquiry about our services\"

Only the first word (Your) is kept, which is the first word before space.

Any idea why?

I have spent hours searching online through different forums and tutorials without any results.

thanks in advance.

 

 

Edited by PHP5000
Link to comment
Share on other sites

this is a symptom of the browser not recognizing quotes around a value attribute in the markup. you would need to post your code and a sample of your data that reproducers the problem for anyone here to be able to help. also, what does the 'view source' in the browser show for the markup?

btw - instead of escaping double-quotes inside a php string, you can simply use single-quotes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.