When I run it, the default value in the “value” attribute for the input box shows “aaa”.
Can anyone explain me why?
Why doesnt the the default value inserted to “value” attribute as “aaa aaa” sohow “aaa aaa”?!
Thanks !
Missing quotes around the value parameter. You’ve put double-quotes around the rest of the values on that line, do the same with value. It sees the space in the string as the end of the value, and ignores the second “aaa”. View the HTML source in your browser to see.
Incidentally this is nothing to do with you echoing it from PHP, it would do the same if it was plain HTML.
True, but I’m guessing that’s not the whole story. Probably the sting is standing in for a variable that will contain a string.
But still, as @droopsnoot pointed out, this is not really a php problem at all, it’s just incorrect html syntax.
The original code displays a table of a “select” result.
Each line can be edited by clicking the “edit” button.
In that case I want that line of the table to be a form with input boxes containing the original values of the line “clicked”.
The values were only partially displayed and I wondered why.
Sending the whole php/MySQL/html/css code wouldn’t be useful so I worked hard to extract the core of the problem.
Thank you anyway