Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8507005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:44:51+00:00 2026-06-11T02:44:51+00:00

I pulling text that is stored in my database using MySQL select so it

  • 0

I pulling text that is stored in my database using MySQL select so it is displayed in a form so it can be edited.

When the form is set to the string held in the database gets truncated at the first space so “Foo Bar” would be displayed as “Foo”. This doesn’t happen when using the tag.

I have made sure that the text field is big enough to hold the entire string and the number of charters isn’t limited.

In the database the whole word is stored and no truncation is happening. I set the type to varchar(30) which is enough space to store the whole word. I have also tried changing the type to text and I still have the problem.

I can’t seam to find a solution anywhere does anyone have an idea of why this may be happening?

 <?php echo "<input type=\"text\" name=\"title[" . $row["id"] . "]\" value=" . $row["title"] . ">"; ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:44:53+00:00Added an answer on June 11, 2026 at 2:44 am

    You should provide a sample of the HTML produced from your php page. Most likely, your value string is not being quoted, e.g. your HTML form looks like:

    <input type=text value=Foo Bar>
    

    instead of

    <input type=text value="Foo Bar">
    

    This would produce exactly the effect you are seeing


    UPDATE: Based on your example in the comment, you are indeed missing the quotes:

    Old code with the problem (missing quotes around value attribute’s value):

    <?php echo "<input type=\"text\" name=\"title[" . $row["id"] . "]\"
      value=" . $row["title"] . ">"; ?>
    

    Fixed code:

    <?php echo "<input type=\"text\" name=\"title[" . $row["id"] . "]\"
     value=\"" . $row["title"] . "\">"; ?> 
    

    Note that you already had the name attribute correctly quoted, but value was not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pulling some text passages from a database that have some minimal formatting using
I have some text stored in MySQL database like this Tom gave Sarah £5
I have a jquery text rotator that rotates text pulling from a database with
currently I'm pulling text from a website using public String getText(String uri) { HttpClient
My jqGrid that does a great job of pulling data from my database, but
I have a value I am pulling into a string that looks like this:
I'm pulling some internationalized text from a MS SQL Server 2005 database. As per
I have a text file that I am pulling from my SD card which
What I'm doing is working with a text document that I'm pulling numbers from
Here is my code, what im doing is pulling text from a database, displaying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.