Page 1 of 1

Using quotes to represent measurement (inch or foot)

Posted: Wed Oct 10, 2007 4:21 pm
by melanie74
Hello everyone!

I’m new to the board, but I’m hoping that someone can help me with this issue. I have an application written mostly in PHP, but uses HTML forms to collect data from users. The data is stored in a MySQL database. Anywho, the problem occurs if a user enters data such as 15" monitor or 50' cord into the form. In the database the data is displayed correctly. But in the browser it is truncated to either 15 (if single quotes used in input tag) or 50 (if double quotes used in input tag). What can I do so that no matter which type of measurement a user inputs, it will be displayed correctly? The user's input is held in $description. Below is the input code I used

Code: Select all

<input type = 'text' size = '40' name = 'pdescription' value ='<?php echo $description; ?>'></input>
If anyone can help with this, I'd greatly appreciate it.

Posted: Wed Oct 10, 2007 4:25 pm
by VladSun

Posted: Wed Oct 10, 2007 5:02 pm
by feyd