Forum Moderators: coopster
I'm creating a site that allows users to store and update profiles. On the "Modify Profile" screen, I display the text from various parts of the profile in their respective sections, so the user can edit it and just hit submit.
The problem is this: Some inputs use <input type="text">, such as the user's name, trade and location. When a user registers, for example, they'll say "New York" as their location and it will be stored that way in the database. However, when they bring up the modify profile screen and I try to display their location like this:
<input name="Alocation" type="text" value='.stripslashes($row2["location"]).'>
It only displays "New"
yet if I try to display it like this:
<textarea name="Alocation" rows="5" cols="60">'.stripslashes($row2["location"]).'</textarea>
The entire "New York" will display.
Can someone tell me why this happens, and if there's a way to fix this problem with <input type="text">? I'd rather not use <textarea> for small items if I don't have to, since it looks ugly.
-Michael