Please help; I have input text data from a form into mySQL table, recovered it using php script and written it back to the form using value=var[ ]. If the data has spaces in it, i.e. more than one word, all characters after the first space are lost. But echo before the table HTML shows that the full text was recovered from the table. What's going on?

Hi,
Are you storing data in array after retrieving from mysql.
y?
Please try this way ans see your output-- store it as string variable.

If you have any doubt please let me know.

Thanks. Yes, in the php code I set a variable $x equal to the retrieved record array from the mysql table. Thereafter I used $x[columname] to get the data. echo $x[ ] gave correct full string, but input value=var[ ] was lopped.

Thanks. Yes, in the php code I set a variable $x equal to the retrieved record array from the mysql table. Thereafter I used $x[columname] to get the data. echo $x[ ] gave correct full string, but input value=var[ ] was lopped.

Hi Dear,
Did you get your solution.
If yes please make this thread as solved.
If not please let me know.

Thanks.

Dear Arunmagar
Yes thanks, the problem is now solved by putting in quotes i.e. input value ='$var[]'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.