Jump to content

Data truncated at first space in input box


cotarider

Recommended Posts

I have a page which I want to use to edit records in a MySQL table. The SQL part works fine but when I use echo to put the current values into an input box it only displays the data up to the first space. If as a test I just put echo and the variable name, I get all of the value displayed.

Link to comment
Share on other sites

You say the data stores in the SQL table correctly?  In my experience, that usually happens when you don't quote your strings correctly with an INSERT or UPDATE statement (it'll cut off at first space when going into the table...thus it gets only the first part when you display).

Link to comment
Share on other sites

You say the data stores in the SQL table correctly?  In my experience, that usually happens when you don't quote your strings correctly with an INSERT or UPDATE statement (it'll cut off at first space when going into the table...thus it gets only the first part when you display).

 

They said if they echo it in another place in the script they get the full value, so I don't think thats the problem.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.