Page 1 of 1

Problems with Spaces in Data SQL/PHP

Posted: Fri Jul 06, 2007 12:08 pm
by kevinsal
When I enter data such as "Phone Template Document" into my database it works correctly.

However when I pull up the data in a field to edit using...

Code: Select all

<tr> 
    <td><b>Document Name:</b></td> 
    <td><INPUT size=39 name=store_name value=<?=$data[1]?>></td> 
  </tr>
Only the 'Phone' shows up in the field. Why does it get cut off with the space? How do I bring the entire variable back including spaces? This is a huge bug because any data with a space will get cut off when re-submitting.

Thanks
Kevin
kevinsallmen@yahoo.com

Choose the Right Board

Posted: Fri Jul 06, 2007 12:15 pm
by RobertGonzalez
First things first. Welcome to the boards. This thread should have gone into Client Side.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
You need to wrap your element attribute values in quotes.

Code: Select all

<input type="text" name="textField" value="A Value with spaces in it that renders correctly" />