mysql - how to display the entire variable with space in textbox in php -


i want display value space in text box.database value "usman road". in text box shows "usman".

            $value="select * employee e_id=$ses";             $value1=mysql_query($value);             $vfet=mysql_fetch_assoc($value1);     echo '<p>first name<input type="text" name="f" size=18 maxlength=50 style="background-color:transparent;border:0px solid white;" readonly value='.$vfet['e_first_name'].'></p>'; 

put quotes around value

... value="'.$vfet['e_first_name'].'"... 

what have is invalid html , breaks value on space

... value='.$vfet['e_first_name'].' ...  // value = john doe                                                  ^ 

after making change become

value = "john doe" 

to use unquoted value attributes have follow following html specifications

an unquoted attribute value specified providing following parts in following order:

1.an attribute name

2.zero or more space characters

3.a single "=" character

4.zero or more space characters

5.an attribute value

in addition general requirements attribute values, unquoted attribute value has following restrictions:

• must not > contain literal space characters

• must not contain """, "'",> "=", ">", "<", or "`", characters

must not empty string

since value has space, breaks rules :)

reference


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -