Help with inputbox
| From: | Ricardo Pinto | Date: | Wed, 02 Apr 2008 14:02:53 +0000 |
| Subject: | Help with inputbox | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272443@lists.php.net to get a copy of this message | ||
Description:
------------
text including spaces placed in an input text control in HTML show the
whole text.
text including spaces placed in an input text control in PHP does not
show the whole text, only the first word up to the first space is
displayed. The same happens with variables from a BD.
My code:
$result = mysql_query("SELECT id, creation, modif, origin_val, dealer_id,
concat(ifnull(name_1,' '),' ',ifnull(name_2,' '),' ',
ifnull(name_3,' ')) as
NOME
FROM crm_entity where id=$x");
$row = mysql_fetch_array($result);
$id = $row['id'];
$creation = $row['creation'];
echo"$creation";
$modif = $row['modif'];
$origin_val = $row['origin_val'];
$dealer_id = $row['dealer_id'];
$name = $row['NOME'];
echo "
<div id=\"quadro_1\">ID : $x
Criação: <input type=\"text\" size=\"50\"
maxlength=\"12\"
name=\"\" value=$creation>
Modificação: <input type=\"text\" size=\"50\"
maxlength=\"50\"
name=\"\" value=$modif>
Origin_Val: <input type=\"text\" size=\"10\"
maxlength=\"50\"
name=\"\" value=$origin_val>
Dealer_Id: <input type=\"text\" size=\"10\"
maxlength=\"50\"
name=\"\" value=$dealer_id><br><br>
Name: <input type=\"text\" size=\"10\" maxlength=\"50\"
name=\"\"
value=$name>
</div>
<br><br>
";
--> There's more code, but is the same steps....
Output
ID : 100002 Criação: Modificação: Origin_Val: Dealer_Id:
Num_cli: NIF: Crm Code: Type_Val:
Titulo: Trato: Origin_Val:
Nome 1: Eolmar- Escola de Condução de Magalhães e SÁ, Lda Nome 2: Nome 3:
Nome:
Short Name: Sector de Actividade:
The date that appear has seconds, etc...in the field "Nome 1" only appears
the first one...the rest after the space doesn't appear! Everything after
the space don't appear....
Can you help me please?? It's Urgent!
Thanks!!
Ricardo Pinto