Jump to content

[SOLVED] displaying speech marks in HTML Input Box


Recommended Posts

Hi,

 

Thought this was more of a html question than php. I have a form which allows users to enter the height (such as 5' 11"). This goes into the database as 5/' 11/" which is fine. Now when i display the date in a html input box again for editing i first strip the slashes and then echo the value in the text box. However the text box displays 5' 11 (misses off the speech mark).

 

I assume this is because the speech mark is ending the input value="". So if I put 5" 1' the text box displays 5 (stops at speech mark), Is there any way to escape the speech mark so it prints out inside a text box?

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.