Using quotes to represent measurement (inch or foot)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
melanie74
Forum Newbie
Posts: 1
Joined: Wed Oct 10, 2007 3:57 pm

Using quotes to represent measurement (inch or foot)

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

There are 10 types of people in this world, those who understand binary and those who don't
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply