Hi,
I'm not sure if this is a php issue or an sql one. I have a field 'color' and when I put in say "Navy blue" and output that into a input field I only get "Navy". Can anyone help explain to me why this is happening and what I need to do to get around it?
Thanks in advance.
vfm.
Form field & spaces
Moderator: General Moderators
-
Blackveiled
- Forum Newbie
- Posts: 2
- Joined: Thu Nov 04, 2010 3:07 am
Re: Form field & spaces
Try making sure the field value in your database where "Navy blue" is found is "varchar" type. Otherwise, you should explain with more detail. It's probably an SQL problem.
Re: Form field & spaces
Hi,
It doesn't actually look like it's an SQL problem. When I submit a value and look at the database I see the full string. However, when I use this:
<input type="text" name="colour" id="colour" size="50" value=<?= $row['colour'] ?>>
I see "Navy". Does it have something to do with the way I'm calling it?
Cheers,
vfm.
It doesn't actually look like it's an SQL problem. When I submit a value and look at the database I see the full string. However, when I use this:
<input type="text" name="colour" id="colour" size="50" value=<?= $row['colour'] ?>>
I see "Navy". Does it have something to do with the way I'm calling it?
Cheers,
vfm.
Re: Form field & spaces
Your value attribute needs to be in quotes in the HTML.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
-
Blackveiled
- Forum Newbie
- Posts: 2
- Joined: Thu Nov 04, 2010 3:07 am
Re: Form field & spaces
This.s.dot wrote:Your value attribute needs to be in quotes in the HTML.